mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 11:10:11 +08:00
refactor: userController and add req user type
This commit is contained in:
1 parent
4c421b4cb3
commit
c912319967
8 files changed
+49
-23
No files matched your search
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
declare namespace Express {
|
||||
export type SocialLogin = {
|
||||
provider: string
|
||||
id: string
|
||||
displayName?: string
|
||||
}
|
||||
|
||||
export type PendingUser = {
|
||||
email: string
|
||||
socialLogin: SocialLogin
|
||||
}
|
||||
|
||||
export interface ExistingUser {
|
||||
id: string
|
||||
username: string
|
||||
email: string
|
||||
}
|
||||
|
||||
export interface NewUser {
|
||||
newUser?: PendingUser
|
||||
}
|
||||
|
||||
export type User = ExistingUser | NewUser
|
||||
}
|
||||
Reference in new issue
Block a user