aboutsummaryrefslogtreecommitdiffstats
path: root/engine/src/main/java
diff options
context:
space:
mode:
authorKostya <mail@sartin.in>2026-10-11 12:20:47 +0300
committerKostya <mail@sartin.in>2026-10-11 12:21:10 +0300
commitcf13d4608acfb2d81ec0056717e561bb40f991a2 (patch)
treed12b0eaed413e8e17200a6bcb3a6fc6370960044 /engine/src/main/java
parent1cb67cec8951553fdb5969d947e49f2288f3847f (diff)
downloadguess-market-cf13d4608acfb2d81ec0056717e561bb40f991a2.tar.gz
guess-market-cf13d4608acfb2d81ec0056717e561bb40f991a2.tar.xz
guess-market-cf13d4608acfb2d81ec0056717e561bb40f991a2.zip
server: add account, deposit and user directory endpoints
Give each logged-in user their own account view and a view of everyone else, as the spec asks: - GET /api/user/account returns the caller's balance, blocked flag and every ledger row (trades, fees, payouts, deposits). - POST /api/user/deposit (form field "amount") tops the account up through AccountContext.deposit, so its validation and DEPOSIT ledger entry are the same as in the engine. Bad amounts get 400. - GET /api/users lists every account with its name, balance and whether it makes any market, the three facts the spec requires about other users, plus whether it is logged in right now, which the login registry already knows. Accounts outlive their sessions, so the list includes users who are currently logged out. A test drives two clients through a whole market: one deposits, uploads and opens an event, the other deposits and buys, the first resolves it, and the winner's balance rises by exactly one per winning share.
Diffstat (limited to 'engine/src/main/java')
0 files changed, 0 insertions, 0 deletions