janczizikow / timeoff_backend

https://timeoff-backend.herokuapp.com/admin
1 stars 0 forks source link

POST /api/leave-requests/ Bad Request #4

Closed dbilgin closed 4 years ago

dbilgin commented 4 years ago

Which fields should be sent here and in which format?

janczizikow commented 4 years ago

ups sry, the issue got auto-closed with "magic" commit message. There was an issue with that endpoint, I've fixed it and added the example payload to readme.

Should work with something like this now:

{
    "start": "2019-12-02T10:00:00.000Z",
    "end": "2019-12-03T19:00:00.000Z",
    "description": "Gotta chill.",
    "type": "VACATION",
    "status": "PENDING"
}

I guess it would make sense to skip status field and auto set it to PENDING 🤔

dbilgin commented 4 years ago

@janczizikow Am I able to set the status currently? I think I shouldn't have permission to do that as a regular employee, right?