mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
Fixing use of nanoid.
This commit is contained in:
parent
ed36285c2f
commit
c1aaad7f6c
1 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import { fail, error, type Actions } from '@sveltejs/kit';
|
||||
import { Argon2id } from 'oslo/password';
|
||||
import { eq } from 'drizzle-orm';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { zod } from 'sveltekit-superforms/adapters';
|
||||
import { setError, superValidate } from 'sveltekit-superforms/server';
|
||||
import { redirect } from 'sveltekit-flash-message/server';
|
||||
|
|
@ -12,6 +11,7 @@ import { signUpSchema } from '$lib/validations/auth';
|
|||
import { add_user_to_role } from '$server/roles';
|
||||
import db from '$lib/drizzle';
|
||||
import { collections, users, wishlists } from '../../../schema';
|
||||
import { createId as cuid2 } from '@paralleldrive/cuid2';
|
||||
|
||||
const limiter = new RateLimiter({
|
||||
// A rate is defined by [number, unit]
|
||||
|
|
@ -93,7 +93,7 @@ export const actions: Actions = {
|
|||
if (!user || user.length === 0) {
|
||||
return fail(400, {
|
||||
form,
|
||||
message: `Could not create your account. Please try again. If the problem persists, please contact support. Error ID: ${nanoid()}`
|
||||
message: `Could not create your account. Please try again. If the problem persists, please contact support. Error ID: ${cuid2()}`
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue