9 lines
242 B
TypeScript
9 lines
242 B
TypeScript
export default defineEventHandler(async (event) => {
|
|
const input = await readValidBody(event, newNoteSchema)
|
|
const row = await createRow<NoteRow>(event, 'notes', {
|
|
Datum: input.date,
|
|
Notes: input.text
|
|
})
|
|
return toNote(row)
|
|
})
|