Added custom notification

This commit is contained in:
2017-10-26 14:59:49 +07:00
parent bc21934274
commit a106344dc8
15 changed files with 238 additions and 103 deletions

View File

@@ -338,6 +338,7 @@ class Posts
}
$post['status'] = true;
$post['route_to'] = '';
$post['message'] = 'Pengumuman berhasil ditambahkan';
if (isset($_SERVER['HTTP_CLIENT']) && $_SERVER['HTTP_CLIENT'] == 'api') {
echo json_encode($post);
die();
@@ -350,6 +351,7 @@ class Posts
public function put($args)
{
// echo json_encode($args); die();
$update = [];
if (isset($args['_addon'])) {
@@ -413,6 +415,7 @@ class Posts
if ($this->model->update($args, $id)) {
$update['status'] = true;
$update['route_to'] = '';
$update['message'] = 'Pengumuman berhasil diubah';
if (isset($_SERVER['HTTP_CLIENT']) && $_SERVER['HTTP_CLIENT'] == 'api') {
echo json_encode($update);
die();