Add proper toast notifications to edit/create beer post. fix delete

This commit is contained in:
Aaron William Po
2023-12-01 14:34:26 -05:00
parent 293200fbe2
commit 49d5b782a9
3 changed files with 13 additions and 8 deletions

View File

@@ -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);
}