resolve remaining ESlint errors
This commit is contained in:
1 parent
1a504a3cd9
commit
ee5f7427e7
5 files changed
+15
-9
No files matched your search
@@ -2,7 +2,7 @@ import { NextFunction, Request, Response } from "express";
|
||||
|
||||
import jwt from "jsonwebtoken";
|
||||
import { AppError } from "@/utils/AppError.js";
|
||||
import { Settings } from "@/types/settings.js";
|
||||
import type { ISettingsService } from "@/service/system/settingsService.js";
|
||||
import type { User } from "@/types/user.js";
|
||||
|
||||
const SERVICE_NAME = "verifyJWT";
|
||||
@@ -12,7 +12,7 @@ const isUser = (payload: unknown): payload is User => {
|
||||
return typeof payload === "object" && payload !== null && "id" in payload && "teamId" in payload && "role" in payload;
|
||||
};
|
||||
|
||||
export const createVerifyJWT = (settingsService: { getSettings: () => Settings }) => {
|
||||
export const createVerifyJWT = (settingsService: ISettingsService) => {
|
||||
return (req: Request, res: Response, next: NextFunction) => {
|
||||
const token = req.headers["authorization"];
|
||||
// Make sure a token is provided
|
||||
|
||||
Reference in new issue
Block a user