File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,10 @@ and the server will run on port 8080
7171 - Consistent wallet balances
7272 - No lost or duplicate transactions
73735 . Simplify API Design
74- - Use POST for all write operations
74+ - Use PUT for all idempotent write operations
7575 - Use GET for read operations
76+ - Use POST for non-idempotent write operations
77+ - We should implement authorization in the real world, but it is not in this demo
7678
7779## API Design
78801 . Create Wallet
@@ -99,6 +101,7 @@ and the server will run on port 8080
99101 - Ensures idempotency and prevents duplicate transactions
100102 - We can also put transaction validation logic here, and return hash as transactionID
101103 - And when transactionID is used, we can use it to validate the transaction in middleware
104+ - But for simplicity, we don't do that in this demo
1021054 . Deposit
103106 - PUT /api/v1/users/{userID}/wallet/deposit
104107 - Deposits funds into user's wallet
You can’t perform that action at this time.
0 commit comments