From f7c2fa37abb6c29935b3cf82c22733d75f447f5c Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Wed, 20 Jul 2016 16:44:22 +0100 Subject: [PATCH] Fill out `getInviteByToken` --- .../Collaborators/CollaboratorsInviteController.coffee | 8 ++++++++ services/web/app/views/project/invite.jade | 1 + 2 files changed, 9 insertions(+) create mode 100644 services/web/app/views/project/invite.jade diff --git a/services/web/app/coffee/Features/Collaborators/CollaboratorsInviteController.coffee b/services/web/app/coffee/Features/Collaborators/CollaboratorsInviteController.coffee index 985adb6704..95f8e35e97 100644 --- a/services/web/app/coffee/Features/Collaborators/CollaboratorsInviteController.coffee +++ b/services/web/app/coffee/Features/Collaborators/CollaboratorsInviteController.coffee @@ -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) -> diff --git a/services/web/app/views/project/invite.jade b/services/web/app/views/project/invite.jade new file mode 100644 index 0000000000..705cea4fe8 --- /dev/null +++ b/services/web/app/views/project/invite.jade @@ -0,0 +1 @@ +h1 Invite TEST \ No newline at end of file