Commit Graph

5 Commits

Author SHA1 Message Date
David-R69 72bb396a5d add account and transaction modules, fix user module issues
Accounts
- Create account, list accounts, get balance
- Increase, decrease and transfer using atomic $inc updates
  (no negative balances, no race conditions)
- Ownership check: users can only access their own accounts

Transactions
- Record every increase/decrease (transfers log both sides with related_acc_num)
- List transactions per account (owner only)

User fixes
- Remove unused simplejwt import (caused ImportError)
- Check for duplicate username on register
- Block soft-deleted users from logging in; return user id on login
- Register UserList route (/user/list), exclude deleted users, escape regex input
- Return 400 for invalid ObjectId instead of 500
- Return 200 instead of 204 with a body on hard delete

Misc
- Add shared helpers (amount parsing, field validation, ownership checks)
- Guard app.run with if __name__ == "__main__"
2026-11-03 13:14:57 +03:30
Saeid 26e8fe70b5 feat(auth): complete authentication 2026-10-28 18:33:28 +03:30
baharm 45b86ca0e5 feat hash 2026-10-28 16:28:07 +03:30
baharm ad50ce01ce third commit 2026-10-26 12:14:08 +03:30
baharm c0a630781c second commit 2026-10-26 11:42:15 +03:30