update question
This commit is contained in:
@ -20,7 +20,7 @@ Imagine that you're building a fintech system. You're now building a small micro
|
|||||||
-d '{"amount": 100, "sender": "1", "receiver": "2"}'
|
-d '{"amount": 100, "sender": "1", "receiver": "2"}'
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Implement a new API endpoint `GET /all-transactions` that shows all transactions in the system.
|
1. Implement a new API endpoint `GET /transactions` that shows all transactions in the system.
|
||||||
|
|
||||||
1. Commit & push your changes to the git upstream.
|
1. Commit & push your changes to the git upstream.
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ app.post('/transfer', async (c) => {
|
|||||||
const { amount, sender, receiver } = body;
|
const { amount, sender, receiver } = body;
|
||||||
|
|
||||||
if (amount <= 0) {
|
if (amount <= 0) {
|
||||||
return c.json({ error: 'Amount must be greater than 0' }, 40);
|
return c.json({ error: 'Amount must be greater than 0' }, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
const transfer = {
|
const transfer = {
|
||||||
|
|||||||
Reference in New Issue
Block a user