forked from mirrors/easyappointments
Added timezone support to the API when managing users (#952).
This commit is contained in:
parent
88b96f53cc
commit
039f3ec993
4 changed files with 24 additions and 0 deletions
|
@ -40,6 +40,7 @@ class Admins implements ParsersInterface {
|
|||
'state' => $response['state'],
|
||||
'zip' => $response['zip_code'],
|
||||
'notes' => $response['notes'],
|
||||
'timezone' => $response['timezone'],
|
||||
'settings' => [
|
||||
'username' => $response['settings']['username'],
|
||||
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
||||
|
@ -115,6 +116,11 @@ class Admins implements ParsersInterface {
|
|||
$decoded_request['notes'] = $request['notes'];
|
||||
}
|
||||
|
||||
if ( ! empty($request['timezone']))
|
||||
{
|
||||
$decoded_request['timezone'] = $request['timezone'];
|
||||
}
|
||||
|
||||
if ( ! empty($request['settings']))
|
||||
{
|
||||
if (empty($decoded_request['settings']))
|
||||
|
|
|
@ -40,6 +40,7 @@ class Providers implements ParsersInterface {
|
|||
'state' => $response['state'],
|
||||
'zip' => $response['zip_code'],
|
||||
'notes' => $response['notes'],
|
||||
'timezone' => $response['timezone'],
|
||||
];
|
||||
|
||||
if (array_key_exists('services', $response))
|
||||
|
@ -131,6 +132,11 @@ class Providers implements ParsersInterface {
|
|||
$decoded_request['notes'] = $request['notes'];
|
||||
}
|
||||
|
||||
if ( ! empty($request['timezone']))
|
||||
{
|
||||
$decoded_request['timezone'] = $request['timezone'];
|
||||
}
|
||||
|
||||
if ( ! empty($request['services']))
|
||||
{
|
||||
$decoded_request['services'] = $request['services'];
|
||||
|
|
|
@ -41,6 +41,7 @@ class Secretaries implements ParsersInterface {
|
|||
'zip' => $response['zip_code'],
|
||||
'notes' => $response['notes'],
|
||||
'providers' => $response['providers'],
|
||||
'timezone' => $response['timezone'],
|
||||
'settings' => [
|
||||
'username' => $response['settings']['username'],
|
||||
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
||||
|
@ -116,6 +117,11 @@ class Secretaries implements ParsersInterface {
|
|||
$decoded_request['notes'] = $request['notes'];
|
||||
}
|
||||
|
||||
if ( ! empty($request['timezone']))
|
||||
{
|
||||
$decoded_request['timezone'] = $request['timezone'];
|
||||
}
|
||||
|
||||
if ( ! empty($request['providers']))
|
||||
{
|
||||
$decoded_request['providers'] = $request['providers'];
|
||||
|
|
|
@ -977,6 +977,8 @@ definitions:
|
|||
type: string
|
||||
notes:
|
||||
type: string
|
||||
timezone:
|
||||
type: string
|
||||
settings:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -1012,6 +1014,8 @@ definitions:
|
|||
type: string
|
||||
notes:
|
||||
type: string
|
||||
timezone:
|
||||
type: string
|
||||
services:
|
||||
type: array
|
||||
items:
|
||||
|
@ -1063,6 +1067,8 @@ definitions:
|
|||
type: string
|
||||
notes:
|
||||
type: string
|
||||
timezone:
|
||||
type: string
|
||||
providers:
|
||||
type: array
|
||||
items:
|
||||
|
|
Loading…
Reference in a new issue