create users through admin page
This commit is contained in:
@@ -3,6 +3,7 @@ use uuid::Uuid;
|
||||
|
||||
use crate::domain::warren::models::user::User;
|
||||
|
||||
pub mod admin;
|
||||
pub mod auth;
|
||||
pub mod extractors;
|
||||
pub mod warrens;
|
||||
@@ -10,14 +11,14 @@ pub mod warrens;
|
||||
#[derive(Debug, Clone, Serialize, PartialEq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
/// A session user that can be safely sent to the client
|
||||
pub struct SessionUser {
|
||||
pub(super) struct UserData {
|
||||
id: Uuid,
|
||||
name: String,
|
||||
email: String,
|
||||
admin: bool,
|
||||
}
|
||||
|
||||
impl From<User> for SessionUser {
|
||||
impl From<User> for UserData {
|
||||
fn from(value: User) -> Self {
|
||||
Self {
|
||||
id: *value.id(),
|
||||
|
||||
Reference in New Issue
Block a user