Implement task API with input validation; implement error handling; refactoring

This commit is contained in:
Lexi / Zoe 2022-09-23 20:38:34 +02:00
parent 19d264a03b
commit 50aff05614
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
24 changed files with 612 additions and 131 deletions

28
api_tests/tasks.http Normal file
View file

@ -0,0 +1,28 @@
### Fetch all tasks
GET {{api_host}}/api/tasks
### Fetch one task
GET {{api_host}}/api/tasks/1
### Create new task
POST {{api_host}}/api/tasks
Content-Type: application/json
{
"title": "Some test task"
}
### Update task
PATCH {{api_host}}/api/tasks/1
Content-Type: application/json
{
"description": "Update!"
}
### Delete task
DELETE {{api_host}}/api/tasks/10