fix: Convert createchannel action into a named action

This commit is contained in:
April Hall 2025-02-07 11:49:37 -05:00
parent b69d2d0fef
commit e0364bb90b
No known key found for this signature in database
GPG Key ID: A49AC35CB186266C
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@
<Dialog.Header> <Dialog.Header>
<Dialog.Title>Create Channel</Dialog.Title> <Dialog.Title>Create Channel</Dialog.Title>
</Dialog.Header> </Dialog.Header>
<form class="grid gap-4 py-4" use:enhance method="POST" action="/"> <form class="grid gap-4 py-4" use:enhance method="POST" action="/?/newchannel">
<Input <Input
id="channelName" id="channelName"
name="channelName" name="channelName"

View File

@ -10,7 +10,7 @@ export function load(): void {
} }
export const actions = { export const actions = {
default: async ({ request }) => { newchannel: async ({ request }) => {
const form = await superValidate(request, zod(newChannelSchema)); const form = await superValidate(request, zod(newChannelSchema));
const channel = form.data.channelName; const channel = form.data.channelName;