mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-06 12:41:48 +02:00
Update
Added Example Flag
This commit is contained in:
parent
6877e92a1d
commit
600155a8f1
5 changed files with 10 additions and 5 deletions
|
@ -53,6 +53,10 @@ var EventSchema = new Schema({
|
||||||
type : Boolean,
|
type : Boolean,
|
||||||
default : false
|
default : false
|
||||||
},
|
},
|
||||||
|
isExample : {
|
||||||
|
type : Boolean,
|
||||||
|
default : false
|
||||||
|
},
|
||||||
__private : {
|
__private : {
|
||||||
verificationCode : String,
|
verificationCode : String,
|
||||||
unsubscribeCode : String,
|
unsubscribeCode : String,
|
||||||
|
|
|
@ -9,13 +9,13 @@ var mandrill = require('mandrill-api');
|
||||||
var mandrill_client = new mandrill.Mandrill(app.get('mandrillAPIKey'));
|
var mandrill_client = new mandrill.Mandrill(app.get('mandrillAPIKey'));
|
||||||
|
|
||||||
communicator.on('event:create', function(event){
|
communicator.on('event:create', function(event){
|
||||||
if (!event.creator.allowNotifications && event.isClosed) return;
|
if (!event.creator.allowNotifications || event.isClosed || event.isExample) return;
|
||||||
sendEmailConfirmation(event);
|
sendEmailConfirmation(event);
|
||||||
sendInvites(event);
|
sendInvites(event);
|
||||||
});
|
});
|
||||||
|
|
||||||
communicator.on('event:update:creator.email', function(event, oldEvent){
|
communicator.on('event:update:creator.email', function(event, oldEvent){
|
||||||
if (!event.creator.allowNotifications && event.isClosed) return;
|
if (!event.creator.allowNotifications || event.isClosed || event.isExample) return;
|
||||||
verifyEmail(event);
|
verifyEmail(event);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -43,7 +43,8 @@ angular.module('rallly')
|
||||||
name : "John Example"
|
name : "John Example"
|
||||||
},
|
},
|
||||||
content : "Thank you!"
|
content : "Thank you!"
|
||||||
}]
|
}],
|
||||||
|
"isExample" : true
|
||||||
});
|
});
|
||||||
event.$save(function(data){
|
event.$save(function(data){
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue