Commit Graph

4 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
SaharMousavi 0426c79f66 hi 2026-10-26 16:50:39 +03:30
Saeid 37de443c71 some test enters 2026-10-26 21:06:16 +03:30
baharm c0a630781c second commit 2026-10-26 11:42:15 +03:30