Begin service token data refactor

This commit is contained in:
Tuan Dang
2022-12-30 23:57:21 +03:00
parent addf04d54d
commit 01d969190b
14 changed files with 226 additions and 165 deletions
@@ -4,6 +4,7 @@ import { ServiceToken } from '../models';
import { JWT_SERVICE_SECRET } from '../config';
import { BadRequestError, UnauthorizedRequestError } from '../utils/errors';
// TODO: deprecate
declare module 'jsonwebtoken' {
export interface UserIDJwtPayload extends jwt.JwtPayload {
userId: string;