[#439] Unable to update workdayinfo in bulk

Migrated from Redmine #439 | Author: Atul Agarwal
Status: Rejected | Priority: Immediate, there is BUG! | Created: 2019-11-07


I am using following curl request for marking two special days :-

curl -X POST
https://user-api.fcg-in.enterprisebookings.com/admin
-H ‘Accept: /
-H ‘Accept-Encoding: gzip, deflate’
-H ‘Cache-Control: no-cache’
-H ‘Connection: keep-alive’
-H ‘Content-Length: 136’
-H ‘Content-Type: application/json’
-H ‘Host: user-api.fcg-in.enterprisebookings.com
-H ‘Postman-Token: 96e42fa0-be05-4d46-9a8a-7c72b29e944e,65049ee7-15d0-4422-b371-74d196c13d9f’
-H ‘User-Agent: PostmanRuntime/7.18.0’
-H ‘X-Company-Login: olxin’
-H ‘X-User-Token: fde9ddf209dd0dade08329259d33ca2b3a9c8157ae8e4d625c691abd07e1ba0f’
-H ‘cache-control: no-cache’
-d ‘{“jsonrpc”:“2.0”,“method”:“setWorkDayInfo”,“params”:[{
“is_day_off”:1,
“name”:“Tuesday”,
“index”:2,
“unit_group_id”:“235”
},
{
“is_day_off”:1,
“name”:“Wednesday”,
“index”:3,
“unit_group_id”:“235”
}],“id”:1}’

But it is only marking one day as a special day.

If params are accepting array of objects than It should update both.

Redmine Admin wrote:

you should not pass array of objects into this method, only one day per call

Atul Agarwal wrote:

It is the syntax that is mentioned in API docs.

Atul Agarwal wrote:

It is the syntax that is mentioned in API docs.

!

Redmine Admin wrote:

it is not Company administration service methods - Company administration service methods - SimplyBook.me

otherwise it would be called setWorkDaysInfo