update libflitter/flap & run migrations

This commit is contained in:
2019-08-16 09:58:21 -05:00
parent d25b54da88
commit 33aa97ee49
10 changed files with 68 additions and 55 deletions

View File

@@ -3,7 +3,8 @@
* -------------------------------------------------------------
* Put some description here!
*/
class Invite {
const Middleware = require('libflitter/middleware/Middleware')
class Invite extends Middleware {
/*
* Run the middleware test.
@@ -11,8 +12,8 @@ class Invite {
* It should either call the next function in the stack,
* or it should handle the response accordingly.
*/
test(req, res, next, args = {}){
if ( req.session.invite && !req.originalUrl.includes('/dash/v1/invitation/accept') ){
test(req, res, next, args = {}) {
if (req.session.invite && !req.originalUrl.includes('/dash/v1/invitation/accept')) {
return res.redirect('/dash/v1/invitation/accept')
}