1
0
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:
2020-05-24 17:57:47 +02:00
parent 3b1b377d82
commit 75024dbca6
7 changed files with 82 additions and 5 deletions

View 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
}
}
}

View File

@ -8,4 +8,5 @@
//! Pierre Hubert
pub mod http_error;
pub mod login_success;
pub mod login_success;
pub mod current_user_id;