style: lint
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
/** Authenticated principal exposed to AIRI resource handlers. */
|
||||
export interface AuthSession {
|
||||
user: {
|
||||
session: {
|
||||
createdAt: Date
|
||||
expiresAt: Date
|
||||
id: string
|
||||
name: string
|
||||
ipAddress?: null | string
|
||||
token: string
|
||||
updatedAt: Date
|
||||
userAgent?: null | string
|
||||
userId: string
|
||||
}
|
||||
user: {
|
||||
banExpires?: Date | null
|
||||
banned?: boolean | null
|
||||
banReason?: null | string
|
||||
createdAt: Date
|
||||
email: string
|
||||
emailVerified: boolean
|
||||
image?: string | null
|
||||
banned?: boolean | null
|
||||
banReason?: string | null
|
||||
banExpires?: Date | null
|
||||
lastSeenAt?: Date | null
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}
|
||||
session: {
|
||||
id: string
|
||||
token: string
|
||||
userId: string
|
||||
expiresAt: Date
|
||||
createdAt: Date
|
||||
image?: null | string
|
||||
lastSeenAt?: Date | null
|
||||
name: string
|
||||
updatedAt: Date
|
||||
ipAddress?: string | null
|
||||
userAgent?: string | null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ export interface AuthSession {
|
||||
* Evaluates Better Auth's persisted ban fields without requiring its runtime.
|
||||
* Expired temporary bans are treated as inactive on stateless JWT paths.
|
||||
*/
|
||||
export function isUserBannedNow(user: { banned?: boolean | null, banExpires?: Date | string | null }): boolean {
|
||||
export function isUserBannedNow(user: { banExpires?: Date | null | string, banned?: boolean | null }): boolean {
|
||||
if (!user.banned)
|
||||
return false
|
||||
if (user.banExpires == null)
|
||||
|
||||
Reference in New Issue
Block a user