forked from mirrors/easyappointments
Integrated 'calendar_view' setting in the API (#182).
This commit is contained in:
parent
89725e75c0
commit
cb425e4221
4 changed files with 22 additions and 4 deletions
|
@ -216,7 +216,8 @@ You can also try the GET requests with your browser by navigating to the respeci
|
|||
"notes": "Test admin notes.",
|
||||
"settings":{
|
||||
"username": "chrisdoe",
|
||||
"notifications": true
|
||||
"notifications": true,
|
||||
"calendarView": "default"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -256,6 +257,7 @@ You can also try the GET requests with your browser by navigating to the respeci
|
|||
"googleToken": "23897dfasdf7a98gas98d9",
|
||||
"syncFutureDays":10,
|
||||
"syncPastDays":10,
|
||||
"calendarView": "default",
|
||||
"workingPlan":{
|
||||
"monday":{
|
||||
"start": "09:00",
|
||||
|
@ -332,7 +334,8 @@ You can also try the GET requests with your browser by navigating to the respeci
|
|||
],
|
||||
"settings":{
|
||||
"username":"chrisdoe",
|
||||
"notifications": true
|
||||
"notifications": true,
|
||||
"calendarView": "default"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -39,7 +39,8 @@ class Admins implements ParsersInterface {
|
|||
'notes' => $response['notes'],
|
||||
'settings' => [
|
||||
'username' => $response['settings']['username'],
|
||||
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN)
|
||||
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
||||
'calendarView' => $response['settings']['calendar_view']
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -116,6 +117,10 @@ class Admins implements ParsersInterface {
|
|||
$decodedRequest['settings']['notifications'] = filter_var($request['settings']['notifications'],
|
||||
FILTER_VALIDATE_BOOLEAN);
|
||||
}
|
||||
|
||||
if (!empty($request['settings']['calendarView'])) {
|
||||
$decodedRequest['settings']['calendar_view'] = $request['settings']['calendarView'];
|
||||
}
|
||||
}
|
||||
|
||||
$request = $decodedRequest;
|
||||
|
|
|
@ -41,6 +41,7 @@ class Providers implements ParsersInterface {
|
|||
'settings' => [
|
||||
'username' => $response['settings']['username'],
|
||||
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
||||
'calendarView' => $response['settings']['calendar_view'],
|
||||
'googleSync' => filter_var($response['settings']['google_sync'], FILTER_VALIDATE_BOOLEAN),
|
||||
'googleCalendar' => $response['settings']['google_calendar'],
|
||||
'googleToken' => $response['settings']['google_token'],
|
||||
|
@ -123,6 +124,10 @@ class Providers implements ParsersInterface {
|
|||
$decodedRequest['settings']['password'] = $request['settings']['password'];
|
||||
}
|
||||
|
||||
if (!empty($request['settings']['calendrView'])) {
|
||||
$decodedRequest['settings']['calendr_view'] = $request['settings']['calendrView'];
|
||||
}
|
||||
|
||||
if ($request['settings']['notifications'] !== null) {
|
||||
$decodedRequest['settings']['notifications'] = filter_var($request['settings']['notifications'],
|
||||
FILTER_VALIDATE_BOOLEAN);
|
||||
|
|
|
@ -40,7 +40,8 @@ class Secretaries implements ParsersInterface {
|
|||
'providers' => $response['providers'],
|
||||
'settings' => [
|
||||
'username' => $response['settings']['username'],
|
||||
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN)
|
||||
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
||||
'calendarView' => $response['settings']['calendar_view']
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -121,6 +122,10 @@ class Secretaries implements ParsersInterface {
|
|||
$decodedRequest['settings']['notifications'] = filter_var($request['settings']['notifications'],
|
||||
FILTER_VALIDATE_BOOLEAN);
|
||||
}
|
||||
|
||||
if (!empty($request['settings']['calendarView'])) {
|
||||
$decodedRequest['settings']['calendar_view'] = $request['settings']['calendarView'];
|
||||
}
|
||||
}
|
||||
|
||||
$request = $decodedRequest;
|
||||
|
|
Loading…
Reference in a new issue