mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-26 15:29:21 +00:00
18 lines
332 B
Rust
18 lines
332 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::data::user::UserID;
|
|
|
|
/// Current user ID
|
|
#[derive(Serialize, Deserialize)]
|
|
#[allow(non_snake_case)]
|
|
pub struct CurrentUserID {
|
|
userID: u64
|
|
}
|
|
|
|
impl CurrentUserID {
|
|
pub fn new(id: &UserID) -> CurrentUserID {
|
|
CurrentUserID {
|
|
userID: id.id()
|
|
}
|
|
}
|
|
} |