1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-07 07:56:23 +00:00

return JSON

This commit is contained in:
Loïc Blot (@U-Exp) 2014-09-12 17:22:13 +02:00
parent 52fe3c44c4
commit 8f890000ed

View File

@ -44,11 +44,11 @@ class SmsController extends Controller {
*/
public function push ($smsCount, $smsDatas) {
if ($this->checkPushStructure($smsCount, $smsDatas) === false) {
return $this->errorMsg;
return array("status" => false, "msg" => $this->errorMsg);
}
$this->smsMapper->saveAll($this->userId, $smsDatas);
return "OK";
return array("status" => true, "msg" => "OK");
}
private function checkPushStructure($smsCount, $smsDatas) {