mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-20 16:35:17 +00:00
Can get current user ID
This commit is contained in:
18
src/api_data/current_user_id.rs
Normal file
18
src/api_data/current_user_id.rs
Normal file
@ -0,0 +1,18 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::data::user::UserID;
|
||||
|
||||
/// Current user ID
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[allow(non_snake_case)]
|
||||
pub struct CurrentUserID {
|
||||
userID: i64
|
||||
}
|
||||
|
||||
impl CurrentUserID {
|
||||
pub fn new(id: UserID) -> CurrentUserID {
|
||||
CurrentUserID {
|
||||
userID: id
|
||||
}
|
||||
}
|
||||
}
|
@ -8,4 +8,5 @@
|
||||
//! Pierre Hubert
|
||||
|
||||
pub mod http_error;
|
||||
pub mod login_success;
|
||||
pub mod login_success;
|
||||
pub mod current_user_id;
|
Reference in New Issue
Block a user