mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-27 00:40:58 +01:00
fix: Update check for user existence
This commit is contained in:
@@ -35,8 +35,7 @@ export const userRouter = createTRPCRouter({
|
||||
const user = await ctx.db.query.users.findFirst({
|
||||
where: eq(users.name, input.username),
|
||||
});
|
||||
|
||||
if (user !== null) {
|
||||
if (user !== undefined) {
|
||||
throw new TRPCError({
|
||||
code: "FORBIDDEN",
|
||||
message: "User already exists",
|
||||
|
||||
Reference in New Issue
Block a user