Bug fixes, code cleanup, made root dir /
This commit is contained in:
parent
c21ca52a59
commit
d9e7aa5ecf
78 changed files with 394 additions and 352 deletions
33
types/next-auth.d.ts
vendored
Normal file
33
types/next-auth.d.ts
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
import type { User } from "next-auth"
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
import type { JWT } from "next-auth/jwt"
|
||||
|
||||
type UserId = string
|
||||
|
||||
declare module "next-auth/jwt" {
|
||||
interface JWT {
|
||||
id: UserId
|
||||
role: string
|
||||
sessionToken: string
|
||||
}
|
||||
}
|
||||
|
||||
declare module "next-auth" {
|
||||
interface Session {
|
||||
user: User & {
|
||||
id: UserId
|
||||
role: string
|
||||
sessionToken: string
|
||||
}
|
||||
}
|
||||
|
||||
// override user
|
||||
interface User {
|
||||
username?: string | null
|
||||
email?: string | null
|
||||
role?: string | null
|
||||
id: UserId
|
||||
token?: string
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue