Fill out getInviteByToken

This commit is contained in:
Shane Kilkelly 2016-07-20 16:44:22 +01:00
parent 0dc4e2c0c1
commit f7c2fa37ab
2 changed files with 9 additions and 0 deletions

View file

@ -42,6 +42,14 @@ module.exports = CollaboratorsInviteController =
viewInvite: (req, res, next) ->
projectId = req.params.Project_id
token = req.params.token
CollaboratorsInviteHandler.getInviteByToken projectId, token, (err, invite) ->
if err?
logger.err {projectId, token}, "error getting invite by token"
return next(err)
if !invite
logger.log {projectId, token}, "no invite found for token"
return res.redirect("/")
res.render "project/invite", {invite}
acceptInvite: (req, res, next) ->

View file

@ -0,0 +1 @@
h1 Invite TEST