From f9384d45ac8f04648ad693b3d2dac49d1045015d Mon Sep 17 00:00:00 2001 From: eldadfux Date: Mon, 21 Oct 2019 11:14:32 +0300 Subject: [PATCH] Added new continents route to locale service --- app/controllers/locale.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/app/controllers/locale.php b/app/controllers/locale.php index 62c7c0b24b..37b9b657a1 100644 --- a/app/controllers/locale.php +++ b/app/controllers/locale.php @@ -70,7 +70,7 @@ $utopia->get('/v1/locale/countries') ->label('sdk.method', 'getCountries') ->label('sdk.description', '/docs/references/locale/get-countries.md') ->action( - function () use ($response, $request) { + function () use ($response) { $list = Locale::getText('countries'); /* @var $list array */ asort($list); @@ -127,6 +127,23 @@ $utopia->get('/v1/locale/countries/phones') } ); +$utopia->get('/v1/locale/continents') + ->desc('List Countries') + ->label('scope', 'locale.read') + ->label('sdk.namespace', 'locale') + ->label('sdk.method', 'getContinents') + ->label('sdk.description', '/docs/references/locale/get-continents.md') + ->action( + function () use ($response) { + $list = Locale::getText('continents'); /* @var $list array */ + + asort($list); + + $response->json($list); + } + ); + + $utopia->get('/v1/locale/currencies') ->desc('List of currencies') ->label('scope', 'locale.read')