1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-26 15:29:21 +00:00
comunicapiv3/src/api_data/current_user_id.rs

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()
}
}
}