mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-07-07 16:22:48 +00:00
Can get current admin id
This commit is contained in:
18
src/api_data/admin/admin_id_api.rs
Normal file
18
src/api_data/admin/admin_id_api.rs
Normal file
@ -0,0 +1,18 @@
|
||||
//! # Admin ID API
|
||||
//!
|
||||
//! @author Pierre Hubert
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::data::admin::AdminID;
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct AdminIDAPI {
|
||||
id: u64,
|
||||
}
|
||||
|
||||
impl AdminIDAPI {
|
||||
pub fn new(id: AdminID) -> Self {
|
||||
Self { id: id.id() }
|
||||
}
|
||||
}
|
@ -3,4 +3,5 @@
|
||||
//! @author Pierre Hubert
|
||||
|
||||
pub mod admin_auth_options;
|
||||
pub mod admin_auth_success;
|
||||
pub mod admin_auth_success;
|
||||
pub mod admin_id_api;
|
Reference in New Issue
Block a user