-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.coffee
More file actions
31 lines (28 loc) · 967 Bytes
/
routes.coffee
File metadata and controls
31 lines (28 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Router.map ->
@route 'verifyEmail',
path: '/verify-email/:token'
action: ->
token = @params.token
Meteor.call 'completeVerify', token, (error, result)->
if error?
b3.flashError error.reason
if result?
if result is false
b3.flashError "token does not match."
else
dyna.emailMaybe = result
b3.flashSuccess "#{result} verified."
Session.set 'dynaStep', 'finished'
setTimeout(->
Router.go '/'
,
2800
)
@render()
@route 'resetPassword',
path: '/reset-password/:token'
action: ->
token = @params.token
Session.set('dynaToken', token)
dyna.nextStep 'resetPassword'
@render()