enh
This commit is contained in:
parent
c7412d774a
commit
dc11e77707
1 changed files with 0 additions and 16 deletions
|
|
@ -120,11 +120,6 @@ export const authRouter = router({
|
|||
throw new ApiError('Invalid credentials', 401);
|
||||
}
|
||||
|
||||
// Check if user is suspended
|
||||
if (userDetail?.isSuspended) {
|
||||
throw new ApiError('Account suspended', 403);
|
||||
}
|
||||
|
||||
const token = generateToken(foundUser.id);
|
||||
|
||||
const response: AuthResponse = {
|
||||
|
|
@ -286,17 +281,6 @@ export const authRouter = router({
|
|||
user = newUser;
|
||||
}
|
||||
|
||||
// Check if user is suspended (only if userDetails exists)
|
||||
const [userDetail] = await db
|
||||
.select()
|
||||
.from(userDetails)
|
||||
.where(eq(userDetails.userId, user.id))
|
||||
.limit(1);
|
||||
|
||||
if (userDetail?.isSuspended) {
|
||||
throw new ApiError('Account suspended', 403);
|
||||
}
|
||||
|
||||
// Generate JWT
|
||||
const token = generateToken(user.id);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue