Initial 2

This commit is contained in:
Jackzie 2025-04-14 16:25:04 -05:00
commit 98d0065f55
53 changed files with 5857 additions and 0 deletions

23
server/src/user.rs Normal file
View file

@ -0,0 +1,23 @@
use std::collections::HashMap;
use rocket::serde::uuid::Uuid;
use sqlx::query_as;
use crate::DB;
use crate::library::Library;
use crate::models::user::UserModel;
pub struct User {
libraries: HashMap<String, Library>,
}
impl User {
pub fn _idk() -> Self {
Self {
libraries: HashMap::new()
}
}
pub fn get_library(&self, id: &str) -> Option<&Library> {
self.libraries.get(id)
}
}