Changed actions order.
This commit is contained in:
parent
210c96e150
commit
1de9cb6447
@ -108,10 +108,11 @@ class Posts
|
|||||||
'user' => $user,
|
'user' => $user,
|
||||||
'token' => Token::generate()
|
'token' => Token::generate()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$this->table = 'pengumuman';
|
||||||
} else {
|
} else {
|
||||||
throw new \Exception("Page not found", 404);
|
throw new \Exception("Page not found", 404);
|
||||||
}
|
}
|
||||||
$this->table = 'pengumuman';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
@ -174,11 +175,11 @@ class Posts
|
|||||||
'categories' => $categories,
|
'categories' => $categories,
|
||||||
'token' => Token::generate()
|
'token' => Token::generate()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$this->table = 'pengumuman';
|
||||||
} else {
|
} else {
|
||||||
throw new \Exception("Bad request", 400);
|
throw new \Exception("Bad request", 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->table = 'pengumuman';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Methods */
|
/* Methods */
|
||||||
|
@ -174,7 +174,6 @@ abstract class Model
|
|||||||
return true;
|
return true;
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
throw new \Exception($e->getMessage(), 444);
|
throw new \Exception($e->getMessage(), 444);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user