Skip to content

Commit

Permalink
Fix PUBLIC_REGISTRATION_ENABLED typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Yureien committed Mar 29, 2024
1 parent 3858f3d commit 517cddb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_FROM=YABin <[email protected]>

PUBLIC_REGISRATION_ENABLED=true
PUBLIC_REGISTRATION_ENABLED=true
PUBLIC_CUSTOM_PATHS_ENABLED=true
PUBLIC_URL=http://localhost:5173
ORIGIN=http://localhost:5173
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Right now, my instance is using PostgreSQL on Vercel. However, it can be run usi

Remember to modify `SALT` to something secure if you plan on using user accounts.

You can disable or enable public registration by modifying the `PUBLIC_REGISRATION_ENABLED` variable to `true` or `false`.
You can disable or enable public registration by modifying the `PUBLIC_REGISTRATION_ENABLED` variable to `true` or `false`.

You can enable custom paste paths for everyone with the variable `PUBLIC_CUSTOM_PATHS_ENABLED`. If it is `false`, only users who are logged in can use custom paths.

Expand Down
2 changes: 1 addition & 1 deletion src/routes/(auth)/register/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {

export const actions: Actions = {
default: async ({ cookies, request }) => {
if (envPublic.PUBLIC_REGISRATION_ENABLED !== 'true') {
if (envPublic.PUBLIC_REGISTRATION_ENABLED !== 'true') {
return fail(404, { success: false, errors: ['Not found'] });
}

Expand Down
2 changes: 1 addition & 1 deletion src/routes/(auth)/register/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div class="text-green-500 text-center">{form.message}</div>
{/if}

{#if env.PUBLIC_REGISRATION_ENABLED == 'true'}
{#if env.PUBLIC_REGISTRATION_ENABLED == 'true'}
<form method="post" class="mt-2 flex flex-col gap-4" use:enhance>
<div>
<label for="username" class="px-2 py-2">Name</label>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
</button>
</div>

{#if env.PUBLIC_REGISRATION_ENABLED == 'true'}
{#if env.PUBLIC_REGISTRATION_ENABLED == 'true'}
<div class="flex flex-row gap-4 mb-4 justify-center">
{#if data.loggedIn}
<a
Expand Down

0 comments on commit 517cddb

Please sign in to comment.