mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-03-14 01:42:37 +00:00
20 lines
353 B
Rust
20 lines
353 B
Rust
|
//! # Admin auth options API structure
|
||
|
//!
|
||
|
//! @author Pierre Hubert
|
||
|
|
||
|
use serde::Serialize;
|
||
|
|
||
|
use crate::data::admin::Admin;
|
||
|
|
||
|
#[derive(Serialize)]
|
||
|
pub struct AdminAuthOptions {
|
||
|
access_token: bool,
|
||
|
}
|
||
|
|
||
|
impl AdminAuthOptions {
|
||
|
pub fn new(admin: &Admin) -> Self {
|
||
|
Self {
|
||
|
access_token: admin.reset_token.is_some()
|
||
|
}
|
||
|
}
|
||
|
}
|