From 7cd9d219d24899859baf3c91650e2b5f7c3ebc94 Mon Sep 17 00:00:00 2001 From: Zokhoi <20432565+Zokhoi@users.noreply.github.com> Date: Tue, 12 Sep 2023 22:30:01 +0800 Subject: [PATCH] Document http verbs to actions --- framerail/src/routes/[slug]/[...extra]/+server.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/framerail/src/routes/[slug]/[...extra]/+server.ts b/framerail/src/routes/[slug]/[...extra]/+server.ts index d058f20169..06535fee36 100644 --- a/framerail/src/routes/[slug]/[...extra]/+server.ts +++ b/framerail/src/routes/[slug]/[...extra]/+server.ts @@ -2,6 +2,9 @@ import { pageDelete } from "$lib/server/page/delete" import { pageEdit } from "$lib/server/page/edit" import { pageMove } from "$lib/server/page/move" +/** + * Edit or create page. + */ export async function POST(event) { let data = await event.request.formData() let slug = event.params.slug @@ -31,6 +34,9 @@ export async function POST(event) { return new Response(JSON.stringify(res)) } +/** + * Delete page. + */ export async function DELETE(event) { let data = await event.request.formData() let slug = event.params.slug @@ -44,6 +50,9 @@ export async function DELETE(event) { return new Response(JSON.stringify(res)) } +/** + * Move page to new slug. + */ export async function PUT(event) { let data = await event.request.formData() let slug = event.params.slug