feat: current bal field on users and corresponding API routes

This commit is contained in:
Ninjdai 2025-08-09 02:11:07 +02:00
parent 5d4ece3c34
commit 9bbdb9decb
5 changed files with 78 additions and 3 deletions

View file

@ -64,7 +64,8 @@ pub async fn manage_users(db: Arc<DatabaseConnection>) {
let new_user = user::ActiveModel {
id: NotSet,
username: Set(username),
hashed_password: Set(hash_password(password))
hashed_password: Set(hash_password(password)),
current_bal_id: Set(None)
};
let res = new_user.insert(db.as_ref()).await.unwrap();