mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-03-14 01:42:37 +00:00
24 lines
469 B
Rust
24 lines
469 B
Rust
|
//! # Administrator role details api
|
||
|
//!
|
||
|
//! @author Pierre Hubert
|
||
|
|
||
|
use serde::Serialize;
|
||
|
|
||
|
use crate::constants::admin::AdminRoleMetadata;
|
||
|
|
||
|
#[derive(Serialize)]
|
||
|
pub struct AdminRoleDetailsAPI {
|
||
|
id: &'static str,
|
||
|
name: &'static str,
|
||
|
description: &'static str,
|
||
|
}
|
||
|
|
||
|
impl AdminRoleDetailsAPI {
|
||
|
pub fn new(r: &AdminRoleMetadata) -> Self {
|
||
|
Self {
|
||
|
id: r.id,
|
||
|
name: r.name,
|
||
|
description: r.description,
|
||
|
}
|
||
|
}
|
||
|
}
|