mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Add proper toast notifications to edit/create beer post. fix delete
This commit is contained in:
@@ -57,7 +57,7 @@ const editBeerPost = async (
|
||||
const deleteBeerPost = async (req: BeerPostRequest, res: NextApiResponse) => {
|
||||
const { id } = req.query;
|
||||
|
||||
const deleted = deleteBeerPostById({ beerPostId: id });
|
||||
const deleted = await deleteBeerPostById({ beerPostId: id });
|
||||
if (!deleted) {
|
||||
throw new ServerError('Beer post not found', 404);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user