Skip to content

Commit f1ae5d2

Browse files
committed
more readme description
1 parent 2ec85e5 commit f1ae5d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.MD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ and the server will run on port 8080
7171
- Consistent wallet balances
7272
- No lost or duplicate transactions
7373
5. 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
7880
1. 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
102105
4. Deposit
103106
- PUT /api/v1/users/{userID}/wallet/deposit
104107
- Deposits funds into user's wallet

0 commit comments

Comments
 (0)