Automatically Logout Banned Users (#12037)

* wip

* logout banned users, fix and refactor language library and middleware

* req.locals -> res.locals

* fix tests

* redirect to login page
This commit is contained in:
Matteo Pagliazzi
2020-04-02 21:46:01 +02:00
committed by GitHub
parent e9100c7132
commit e92ff9737a
11 changed files with 228 additions and 121 deletions

View File

@@ -19,7 +19,7 @@ describe('analytics middleware', () => {
next = generateNext();
});
it('attaches analytics object res.locals', () => {
it('attaches analytics object to res', () => {
const attachAnalytics = requireAgain(pathToAnalyticsMiddleware).default;
attachAnalytics(req, res, next);