challenges: switch from ngRoute to ui-router
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user