mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-25 01:12:21 +03:00
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'],
|
'state' => $response['state'],
|
||||||
'zip' => $response['zip_code'],
|
'zip' => $response['zip_code'],
|
||||||
'notes' => $response['notes'],
|
'notes' => $response['notes'],
|
||||||
|
'timezone' => $response['timezone'],
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'username' => $response['settings']['username'],
|
'username' => $response['settings']['username'],
|
||||||
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
||||||
|
@ -115,6 +116,11 @@ class Admins implements ParsersInterface {
|
||||||
$decoded_request['notes'] = $request['notes'];
|
$decoded_request['notes'] = $request['notes'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! empty($request['timezone']))
|
||||||
|
{
|
||||||
|
$decoded_request['timezone'] = $request['timezone'];
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']))
|
if ( ! empty($request['settings']))
|
||||||
{
|
{
|
||||||
if (empty($decoded_request['settings']))
|
if (empty($decoded_request['settings']))
|
||||||
|
|
|
@ -40,6 +40,7 @@ class Providers implements ParsersInterface {
|
||||||
'state' => $response['state'],
|
'state' => $response['state'],
|
||||||
'zip' => $response['zip_code'],
|
'zip' => $response['zip_code'],
|
||||||
'notes' => $response['notes'],
|
'notes' => $response['notes'],
|
||||||
|
'timezone' => $response['timezone'],
|
||||||
];
|
];
|
||||||
|
|
||||||
if (array_key_exists('services', $response))
|
if (array_key_exists('services', $response))
|
||||||
|
@ -131,6 +132,11 @@ class Providers implements ParsersInterface {
|
||||||
$decoded_request['notes'] = $request['notes'];
|
$decoded_request['notes'] = $request['notes'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! empty($request['timezone']))
|
||||||
|
{
|
||||||
|
$decoded_request['timezone'] = $request['timezone'];
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! empty($request['services']))
|
if ( ! empty($request['services']))
|
||||||
{
|
{
|
||||||
$decoded_request['services'] = $request['services'];
|
$decoded_request['services'] = $request['services'];
|
||||||
|
|
|
@ -41,6 +41,7 @@ class Secretaries implements ParsersInterface {
|
||||||
'zip' => $response['zip_code'],
|
'zip' => $response['zip_code'],
|
||||||
'notes' => $response['notes'],
|
'notes' => $response['notes'],
|
||||||
'providers' => $response['providers'],
|
'providers' => $response['providers'],
|
||||||
|
'timezone' => $response['timezone'],
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'username' => $response['settings']['username'],
|
'username' => $response['settings']['username'],
|
||||||
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
||||||
|
@ -116,6 +117,11 @@ class Secretaries implements ParsersInterface {
|
||||||
$decoded_request['notes'] = $request['notes'];
|
$decoded_request['notes'] = $request['notes'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! empty($request['timezone']))
|
||||||
|
{
|
||||||
|
$decoded_request['timezone'] = $request['timezone'];
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! empty($request['providers']))
|
if ( ! empty($request['providers']))
|
||||||
{
|
{
|
||||||
$decoded_request['providers'] = $request['providers'];
|
$decoded_request['providers'] = $request['providers'];
|
||||||
|
|
|
@ -977,6 +977,8 @@ definitions:
|
||||||
type: string
|
type: string
|
||||||
notes:
|
notes:
|
||||||
type: string
|
type: string
|
||||||
|
timezone:
|
||||||
|
type: string
|
||||||
settings:
|
settings:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -1012,6 +1014,8 @@ definitions:
|
||||||
type: string
|
type: string
|
||||||
notes:
|
notes:
|
||||||
type: string
|
type: string
|
||||||
|
timezone:
|
||||||
|
type: string
|
||||||
services:
|
services:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -1063,6 +1067,8 @@ definitions:
|
||||||
type: string
|
type: string
|
||||||
notes:
|
notes:
|
||||||
type: string
|
type: string
|
||||||
|
timezone:
|
||||||
|
type: string
|
||||||
providers:
|
providers:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
|
Loading…
Reference in a new issue