Added custom notification
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user