mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2026-04-27 07:40:10 +00:00
BETTERZON-100: Switching to cookies for session management (#46)
* BETTERZON-100: Switching session handling to cookies * BETTERZON-100: Some code reformatting * BETTERZON-100: Some more code reformatting
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import HttpException from "../common/http-exception";
|
||||
import { Request, Response, NextFunction } from "express";
|
||||
import HttpException from '../common/http-exception';
|
||||
import {Request, Response, NextFunction} from 'express';
|
||||
|
||||
export const errorHandler = (
|
||||
error: HttpException,
|
||||
@@ -9,7 +9,7 @@ export const errorHandler = (
|
||||
) => {
|
||||
const status = error.statusCode || 500;
|
||||
const message =
|
||||
error.message || "It's not you. It's us. We are having some problems.";
|
||||
error.message || 'It\'s not you. It\'s us. We are having some problems.';
|
||||
|
||||
response.status(status).send(message);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Request, Response, NextFunction } from "express";
|
||||
import {Request, Response, NextFunction} from 'express';
|
||||
|
||||
export const notFoundHandler = (
|
||||
request: Request,
|
||||
@@ -6,7 +6,7 @@ export const notFoundHandler = (
|
||||
next: NextFunction
|
||||
) => {
|
||||
|
||||
const message = "Resource not found";
|
||||
const message = 'Resource not found';
|
||||
|
||||
response.status(404).send(message);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user