1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-11 16:32:55 +00:00

Load the country settings at app load

This commit is contained in:
Loic Blot
2015-02-16 13:18:48 +00:00
parent 3774653643
commit 77a9e9cccf
4 changed files with 23 additions and 1 deletions
+11
View File
@@ -314,4 +314,15 @@ class SmsController extends Controller {
$this->configMapper->set("country", $country);
return new JSONResponse(array("status" => true, "msg" => "OK"));
}
/**
* @NoAdminRequired
*/
function getCountry() {
$country = $this->configMapper->getKey("country");
if ($country === false) {
return new JSONResponse(array("status" => false));
}
return new JSONResponse(array("status" => true, "country" => $country));
}
}