challenges: switch from ngRoute to ui-router

This commit is contained in:
Tyler Renelle
2013-10-27 22:27:07 -07:00
parent f178eb2322
commit 35c4a62de0
23 changed files with 614 additions and 708 deletions
+2
View File
@@ -20,6 +20,8 @@ var ChallengeSchema = new Schema({
//},
timestamp: {type: Date, 'default': Date.now},
members: [{type: String, ref: 'User'}]
}, {
minimize: 'false'
});
ChallengeSchema.virtual('tasks').get(function () {
+6 -29
View File
@@ -7,37 +7,14 @@ var GroupSchema = new Schema({
_id: {type: String, 'default': helpers.uuid},
name: String,
description: String,
leader: {
type: String,
ref: 'User'
},
members: [
{
type: String,
ref: 'User'
}
],
invites: [
{
type: String,
ref: 'User'
}
],
type: {
type: String,
"enum": ['guild', 'party']
},
privacy: {
type: String,
"enum": ['private', 'public']
},
_v: {
Number: Number,
'default': 0
},
leader: {type: String, ref: 'User'},
members: [{type: String, ref: 'User'}],
invites: [{type: String, ref: 'User'}],
type: {type: String, "enum": ['guild', 'party']},
privacy: {type: String, "enum": ['private', 'public']},
_v: {Number: Number,'default': 0},
websites: Array,
chat: Array,
/*
# [{
# timestamp: Date
+2
View File
@@ -31,6 +31,8 @@ var TaskSchema = new Schema({
broken: String // CHALLENGE_DELETED, TASK_DELETED, UNSUBSCRIBED, etc
// group: {type: 'Strign', ref: 'Group'} // if we restore this, rename `id` above to `challenge`
}
}, {
minimize: 'false'
});
TaskSchema.methods.toJSON = function() {