mirror of
https://github.com/kind-0/nsecbunkerd.git
synced 2026-01-03 06:24:53 +00:00
add base url to template
This commit is contained in:
parent
eed1baf79a
commit
67f43d95af
@ -163,6 +163,7 @@ export async function processRegistrationWebHandler(request, reply) {
|
||||
try {
|
||||
const record = await getAndValidateStateOfRequest(request);
|
||||
const body = request.body;
|
||||
const baseUrl = new URL(request.url).pathname.split('/')[1];
|
||||
|
||||
// we serialize the payload again and store it
|
||||
// along with the allowed flag
|
||||
@ -179,7 +180,7 @@ export async function processRegistrationWebHandler(request, reply) {
|
||||
const [ username, domain, email ] = JSON.parse(record.params!);
|
||||
const nip05 = `${username}@${domain}`;
|
||||
|
||||
return reply.view("/templates/createAccount.handlebar", { record, email, username, domain, nip05, error: e.message});
|
||||
return reply.view("/templates/createAccount.handlebar", { baseUrl, record, email, username, domain, nip05, error: e.message});
|
||||
}
|
||||
|
||||
await prisma.request.update({
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
</h1>
|
||||
</div>
|
||||
<form
|
||||
action="register/{{record.id}}"
|
||||
action="{{baseUrl}}/register/{{record.id}}"
|
||||
method="POST"
|
||||
class="w-full flex flex-col gap-5">
|
||||
{{#if error}}
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
</h1>
|
||||
</div>
|
||||
<form
|
||||
action="login"
|
||||
action="{{baseUrl}}/login"
|
||||
method="POST"
|
||||
class="w-full flex flex-col gap-5">
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user