chore: init
This commit is contained in:
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
import 'fastify'
|
||||
|
||||
declare module 'fastify' {
|
||||
interface FastifyRequest {
|
||||
user?: IAuthUser
|
||||
}
|
||||
}
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
import { Role } from '@server/modules/auth/auth.constant'
|
||||
|
||||
declare global {
|
||||
interface IAuthUser {
|
||||
id: string
|
||||
role: Role
|
||||
exp?: number
|
||||
iat?: number
|
||||
}
|
||||
|
||||
export interface IListRespData<T = any> {
|
||||
items: T[]
|
||||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import '@my/database/global'
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
import 'socket.io'
|
||||
|
||||
declare module 'socket.io' {
|
||||
interface Socket {
|
||||
user?: IAuthUser
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user