mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-07-07 16:22:48 +00:00
Can create reset token from the API
This commit is contained in:
21
src/api_data/admin/admin_res_create_reset_token.rs
Normal file
21
src/api_data/admin/admin_res_create_reset_token.rs
Normal file
@ -0,0 +1,21 @@
|
||||
//! # Result of creation of a reset token
|
||||
//!
|
||||
//! @author Pierre Hubert
|
||||
|
||||
use crate::data::admin::AdminResetToken;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct AdminResCreateResetToken {
|
||||
token: String,
|
||||
expire: u64,
|
||||
}
|
||||
|
||||
impl AdminResCreateResetToken {
|
||||
pub fn new(token: AdminResetToken) -> Self {
|
||||
Self {
|
||||
token: token.token,
|
||||
expire: token.expire,
|
||||
}
|
||||
}
|
||||
}
|
@ -6,4 +6,5 @@ pub mod admin_auth_options;
|
||||
pub mod admin_auth_success;
|
||||
pub mod admin_id_api;
|
||||
pub mod admin_info_api;
|
||||
pub mod admin_keys_api;
|
||||
pub mod admin_keys_api;
|
||||
pub mod admin_res_create_reset_token;
|
Reference in New Issue
Block a user