Fixed edit entry post issue
This commit is contained in:
@@ -83,7 +83,7 @@ class Api
|
||||
$put['status'] = true;
|
||||
$put['data'] = $update;
|
||||
$put['count'] = count($put['data']);
|
||||
$put['message'] = ucfirst($table) . ' berhasil diubah';
|
||||
$put['message'] = 'Proses berhasil';
|
||||
}
|
||||
|
||||
header('Content-Type: application/json');
|
||||
@@ -107,7 +107,7 @@ class Api
|
||||
$post['status'] = true;
|
||||
$post['data'] = $entry;
|
||||
$post['count'] = count($post['data']);
|
||||
$post['message'] = ucfirst($table) . ' berhasil ditambahkan';
|
||||
$post['message'] = 'Proses berhasil';
|
||||
}
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
@@ -192,7 +192,7 @@ class Home
|
||||
echo json_encode([
|
||||
'status' => true,
|
||||
'route_to' => '',
|
||||
'message' => 'User berhasil ditambahkan'
|
||||
'message' => 'Proses berhasil'
|
||||
]);die();
|
||||
}
|
||||
Session::flash('info', 'Registrasi berhasil');
|
||||
|
||||
@@ -338,7 +338,7 @@ class Posts
|
||||
}
|
||||
$post['status'] = true;
|
||||
$post['route_to'] = '';
|
||||
$post['message'] = 'Pengumuman berhasil ditambahkan';
|
||||
$post['message'] = 'Proses berhasil';
|
||||
if (isset($_SERVER['HTTP_CLIENT']) && $_SERVER['HTTP_CLIENT'] == 'api') {
|
||||
echo json_encode($post);
|
||||
die();
|
||||
@@ -412,10 +412,14 @@ class Posts
|
||||
$length = strlen($args['content']);
|
||||
$args['delay'] = $length * 84;
|
||||
|
||||
$d = new \DateTime();
|
||||
$d = $d->format('Y-m-d H:i:s');
|
||||
$args['edited_at'] = $d;
|
||||
|
||||
if ($this->model->update($args, $id)) {
|
||||
$update['status'] = true;
|
||||
$update['route_to'] = '';
|
||||
$update['message'] = 'Pengumuman berhasil diubah';
|
||||
$update['message'] = 'Proses berhasil';
|
||||
if (isset($_SERVER['HTTP_CLIENT']) && $_SERVER['HTTP_CLIENT'] == 'api') {
|
||||
echo json_encode($update);
|
||||
die();
|
||||
|
||||
Reference in New Issue
Block a user