kopia lustrzana https://github.com/cloudflare/wildebeest
fix connectedActor in alias
rodzic
996a610074
commit
c9ebdf5913
|
@ -8,10 +8,9 @@ const zodSchema = zod$({
|
||||||
alias: z.string().min(1),
|
alias: z.string().min(1),
|
||||||
})
|
})
|
||||||
|
|
||||||
export const action = action$(async (data, { env, platform, html }) => {
|
export const action = action$(async (data, { platform, html }) => {
|
||||||
const db = await getDatabase(platform)
|
const db = await getDatabase(platform)
|
||||||
// eslint-disable-next-line
|
const connectedActor = platform.data.connectedActor
|
||||||
const connectedActor = (env as any).data.connectedActor
|
|
||||||
if (connectedActor === null) {
|
if (connectedActor === null) {
|
||||||
throw html(500, getErrorHtml('user not present in context'))
|
throw html(500, getErrorHtml('user not present in context'))
|
||||||
}
|
}
|
||||||
|
@ -40,7 +39,7 @@ export default component$(() => {
|
||||||
const saveAction = action()
|
const saveAction = action()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form class="login-form" preventdefault:submit action={saveAction}>
|
<Form class="login-form" action={saveAction}>
|
||||||
<div class="max-w-4xl py-14 px-8">
|
<div class="max-w-4xl py-14 px-8">
|
||||||
<h2 class="text-2xl font-bold mb-6">Account Aliases</h2>
|
<h2 class="text-2xl font-bold mb-6">Account Aliases</h2>
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue