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:
Patrick
2021-05-13 18:47:50 +02:00
committed by GitHub
parent 5cc91654c3
commit cb55cae692
14 changed files with 5040 additions and 106 deletions
+3 -3
View File
@@ -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);
};