diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2016-01-01 13:28:01 +0100 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2016-01-01 13:31:54 +0100 |
commit | 0cdcccf1f69b4eacc5c417f11f277bb86a713cdc (patch) | |
tree | cc93dd31aa525cfcf499b8240e98251caf381b69 /models/users.js | |
parent | 9fa291763485c08830bb8fd2108f9ad0c36aea83 (diff) | |
download | wekan-0cdcccf1f69b4eacc5c417f11f277bb86a713cdc.tar.gz wekan-0cdcccf1f69b4eacc5c417f11f277bb86a713cdc.tar.bz2 wekan-0cdcccf1f69b4eacc5c417f11f277bb86a713cdc.zip |
Send invite email in the server console in development mode
Meteor support that use case for us, we don't need to implement our
own validate strategy on top of that. This was also discussed as part
of the #454 review.
Diffstat (limited to 'models/users.js')
-rw-r--r-- | models/users.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/models/users.js b/models/users.js index 45e2170e..5d9c218a 100644 --- a/models/users.js +++ b/models/users.js @@ -166,12 +166,9 @@ if (Meteor.isServer) { board.addMember(user._id); user.addInvite(boardId); - if (!process.env.MAIL_URL || (!Email)) return { username: user.username }; - try { - let rootUrl = Meteor.absoluteUrl.defaultOptions.rootUrl || ''; - if (!rootUrl.endsWith('/')) rootUrl = `${rootUrl}/`; - const boardUrl = `${rootUrl}b/${board._id}/${board.slug}`; + const { _id, slug } = board; + const boardUrl = FlowRouter.url('board', { id: _id, slug }); const vars = { user: user.username, |