add link sharing

This commit is contained in:
2019-06-24 11:45:22 -05:00
parent 2b95fc17a6
commit dc2cec78dc
14 changed files with 195 additions and 8 deletions

View File

@@ -0,0 +1,26 @@
/*
* Invite Middleware
* -------------------------------------------------------------
* Put some description here!
*/
class Invite {
/*
* Run the middleware test.
* This method is required by all Flitter middleware.
* 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') ){
return res.redirect('/dash/v1/invitation/accept')
}
/*
* Call the next function in the stack.
*/
next()
}
}
module.exports = Invite