Refactor: update beer post services, comment services

This commit is contained in:
Aaron William Po
2023-12-11 21:16:33 -05:00
parent 80404802dc
commit f7d09ce61e
27 changed files with 410 additions and 517 deletions

View File

@@ -20,12 +20,11 @@ const sendEditBeerPostRequest = async ({
ibu,
id,
name,
styleId,
}: z.infer<typeof EditBeerPostValidationSchema>) => {
const response = await fetch(`/api/beers/${id}`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ abv, description, ibu, name, styleId, id }),
body: JSON.stringify({ abv, description, ibu, name, id }),
});
if (!response.ok) {