mirror of
https://github.com/Jackzmc/storage.git
synced 2025-05-10 03:53:20 +00:00
Initial 2
This commit is contained in:
commit
98d0065f55
53 changed files with 5857 additions and 0 deletions
23
server/src/user.rs
Normal file
23
server/src/user.rs
Normal 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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue