Commit 68b92745 authored by Цой Данил's avatar Цой Данил 💬

Fixxed some bugs inside auth middleware

parent 246bec2b
...@@ -19,9 +19,9 @@ export const auth = (expressReq: Request, res: Response, next: NextFunction) => ...@@ -19,9 +19,9 @@ export const auth = (expressReq: Request, res: Response, next: NextFunction) =>
next() next()
} catch(err: unknown){ } catch(err: unknown){
const error = err as Error const error = err as Error
const response: IResponse<undefined> = { const response: IResponse<null> = {
status: EStatuses.FAILURE, status: EStatuses.FAILURE,
result: undefined, result: null,
message: error.message message: error.message
} }
res.status(418).send(response) res.status(418).send(response)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment