initial commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
export default defineEventHandler(async (event) => {
|
||||
const input = await readValidBody(event, newReviewSchema)
|
||||
const row = await createRow<ReviewRow>(event, 'reviews', {
|
||||
title: input.title,
|
||||
date: input.date,
|
||||
author_or_director: input.author ?? '',
|
||||
review: input.text,
|
||||
medium: await mediumOptionId(event, input.medium)
|
||||
})
|
||||
return toReview(row)
|
||||
})
|
||||
Reference in New Issue
Block a user