location route

NO validation
no middleware to auth
This commit is contained in:
newtbot
2023-12-30 03:59:04 +08:00
parent 0aefebae75
commit 233ebafdcb
10 changed files with 305 additions and 36 deletions

14
api.MD Normal file
View File

@ -0,0 +1,14 @@
//get all
curl localhost/api/v0/location
//get id
curl localhost/api/v0/1
//post
curl localhost/api/v0/add-location -H "Content-Type: application/json" -X POST -d '{"name": "test", "added_by": "noot" , "description": "test"}'
//put
curl localhost/api/v0/update-location -X PUT -H "Content-Type: application/json" -d '{"id": "1" , "name": "test", "added_by": "noot", "description": "test123"}'
//delete
curl localhost/api/v0/delete-location -X DELETE -H "Content-Type: application/json" -d '{"id": "1" }'