diff --git a/database/schema/userRoles.ts b/database/schema/userRoles.ts index ef0002c..6649c4d 100644 --- a/database/schema/userRoles.ts +++ b/database/schema/userRoles.ts @@ -27,7 +27,7 @@ export const userRoles = pgTable( { user_id: uuid("user_id") .notNull() - .references(() => users.user_id), + .references(() => users.user_id, { onDelete: "cascade" }), role_id: uuid("role_id") .notNull() .references(() => roles.role_id), diff --git a/frontend/src/routes/register.tsx b/frontend/src/routes/register.tsx index 536541c..941c99d 100644 --- a/frontend/src/routes/register.tsx +++ b/frontend/src/routes/register.tsx @@ -33,13 +33,12 @@ function RouteComponent() { Authentication Notice: - To interact with the Alpla prod through this - application, you must use your{" "} - - Windows login credentials + + The username, email, and password are + only for LST you DO NOTNeed to + use Windows username if you do not wish + to. - . These credentials are used solely for - authentication purposes. {/*
  • diff --git a/server/services/auth/controllers/register.ts b/server/services/auth/controllers/register.ts index 54ff8c6..0a68a68 100644 --- a/server/services/auth/controllers/register.ts +++ b/server/services/auth/controllers/register.ts @@ -37,7 +37,7 @@ export const registerUser = async ( .values({ username, email, password }) .returning({ user: users.username, email: users.email }); - if (usercount.length <= 1) { + if (usercount.length === 0) { createLog( "info", "auth",