starter code

This commit is contained in:
Hunter Johnston
2023-02-04 20:52:22 -05:00
parent b15148ca19
commit 17bfc2a6d0
4 changed files with 18 additions and 28 deletions

View File

@@ -10,10 +10,9 @@ export const load: PageServerLoad = async () => {
export const actions: Actions = {
createArticle: async ({ request }) => {
const { title, content } = Object.fromEntries(await request.formData()) as {
title: string
content: string
}
const { title, content } = Object.fromEntries(
await request.formData(),
) as Record<string, string>
try {
await prisma.article.create({