mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-07-06 15:52:48 +00:00
Can sign out user
This commit is contained in:
@ -39,6 +39,13 @@ pub fn auth_with_reset_token(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
r.set_response(AdminAuthSuccess::new(token))
|
||||
}
|
||||
|
||||
/// Sign out current admin
|
||||
pub fn sign_out(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
admin_access_token_helper::destroy(r.admin_id()?)?;
|
||||
|
||||
r.ok()
|
||||
}
|
||||
|
||||
/// Get current admin ID
|
||||
pub fn get_admin_id(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
r.set_response(AdminIDAPI::new(r.admin_id()?))
|
||||
|
Reference in New Issue
Block a user