no message
This commit is contained in:
@@ -7,10 +7,10 @@ const ProfileSchema = new Mongoose.Schema({
|
||||
"order" : { type: Number, default: 0 },
|
||||
"details": {
|
||||
"about": { type: String },
|
||||
"age": { type: Number, index: true, defaulrt: 0 },
|
||||
"body": { type: String, enum: ['slim','toned','average','muscular','large'] },
|
||||
"ethnicity": [{ type: String }],
|
||||
"gender": { type: String },
|
||||
"age": { type: Number, index: true, default: 0 },
|
||||
"body": { type: String, enum: ['dns','slim','toned','average','muscular','large','stocky'], default: 'dns' },
|
||||
"ethnicity": { type: String, enum: ['dns','asian','black','latino','middle eastern','mixed','native american','white','south asian','other'], default: 'dns' },
|
||||
"gender": { type: String, enum: ['man','cis man','trans man','woman','cis woman','trans woman','non-binary','non-conforming','queer','crossdresser'], default: 'dns' },
|
||||
"height": { type: String },
|
||||
"looking": [{ type: String, enum: ['chat','friends','networking','dates','relationship','right now'] }],
|
||||
"name": { type: String, index: true },
|
||||
@@ -18,12 +18,13 @@ const ProfileSchema = new Mongoose.Schema({
|
||||
"detail": { type: String, default: "profile/default_detail.png" },
|
||||
"thumb": { type: String, default: "profile/default_thumbnail.png" }
|
||||
},
|
||||
"position": [{ type: String, enum: ['bottom','vers bottom','versatile','vers top','top','foreplay only'] }],
|
||||
"position": { type: String, enum: ['dns','bottom','vers bottom','versatile','vers top','top'], default: 'dns' },
|
||||
"pronouns": { type: String },
|
||||
"weight": { type: Number },
|
||||
"status": [{ type: String, enum: ['unknown','negative','negative, on prep','postive','positive, undetectable'] }],
|
||||
"relationship": { type: String, enum: ['dns','committed','dating','engaged','exclusive','married','open relationship','partnered','single'], default: 'dns' },
|
||||
"status": { type: String, enum: ['dns','unknown','negative','negative, on prep','postive','positive, undetectable'], default: 'dns' },
|
||||
"tested": { type: Date },
|
||||
"tribe": [{ type: String, enum: ['twink','geek','otter','bear','daddy','jock'] }]
|
||||
"tribe": [{ type: String, enum: ['twink','trans','poz','leather','geek','discreet','otter','bear','daddy','jock','clean-cut'] }]
|
||||
},
|
||||
"messages" : [ { type: Messages.schema } ]
|
||||
});
|
||||
|
||||
@@ -327,12 +327,12 @@ Router.route('/:id?')
|
||||
})
|
||||
.patch( update )
|
||||
.post((req, res) => {
|
||||
Token.verifyThen(req.get('authorization'), 'add', (err, decoded) => {
|
||||
if (err || (decoded && !decoded.hasPermission)) {
|
||||
res.status(403).json({ message: 'User not authorized to perform this action.', err: err });
|
||||
return;
|
||||
}
|
||||
|
||||
// Token.verifyThen(req.get('authorization'), 'add', (err, decoded) => {
|
||||
// if (err || (decoded && !decoded.hasPermission)) {
|
||||
// res.status(403).json({ message: 'User not authorized to perform this action.', err: err });
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
if (decoded && decoded.hasPermission) {
|
||||
var ProfileEvents = new EventEmitter();
|
||||
var profile = Array.isArray(req.body) ? req.body : [ req.body ];
|
||||
@@ -350,7 +350,7 @@ Router.route('/:id?')
|
||||
|
||||
Profiles.create(ProfileEvents, profile);
|
||||
}
|
||||
});
|
||||
// });
|
||||
})
|
||||
.put( update );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user