feat: add generic from payload data
Some checks failed
Publish / Publish Job (push) Has been cancelled
Some checks failed
Publish / Publish Job (push) Has been cancelled
This commit is contained in:
@@ -1,13 +1,3 @@
|
||||
export interface TokenPayload {
|
||||
sub: string
|
||||
}
|
||||
|
||||
// роли храним в токене
|
||||
export interface TokenRolePayload {
|
||||
id: string | number
|
||||
name: string
|
||||
}
|
||||
|
||||
export type VerifyResult =
|
||||
| { valid: true; userId: string; jti: string; role: TokenRolePayload }
|
||||
export type VerifyResult<T = any> =
|
||||
| { valid: true; payload: T; jti: string }
|
||||
| { valid: false; reason: string }
|
||||
|
||||
Reference in New Issue
Block a user