no message
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
const Mongoose = require('mongoose');
|
||||
|
||||
const DetailSchema = new Mongoose.Schema({
|
||||
module.exports = {
|
||||
"about": { type: String },
|
||||
"age": { type: Number, index: true },
|
||||
"body": { type: String },
|
||||
@@ -19,11 +17,4 @@ const DetailSchema = new Mongoose.Schema({
|
||||
"status": { type: String },
|
||||
"tested": { type: Date },
|
||||
"tribe": { type: String }
|
||||
});
|
||||
|
||||
const DetailModel = Mongoose.model('details', DetailSchema);
|
||||
|
||||
module.exports = {
|
||||
schema: DetailSchema,
|
||||
model: DetailModel
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const fs = require('fs');
|
||||
const Details = require('../models/detail');
|
||||
const Messages = require('../models/message');
|
||||
const Mongoose = require('mongoose');
|
||||
const ShortId = require('shortid');
|
||||
@@ -12,7 +11,26 @@ const ATTACHMENT_SUFFIX_THUMBNAIL = '_thumbnail';
|
||||
|
||||
const ProfileSchema = new Mongoose.Schema({
|
||||
"order" : { type: Number, default: 0 },
|
||||
"details": { type: Details.schema },
|
||||
"details": {
|
||||
"about": { type: String },
|
||||
"age": { type: Number, index: true, default: 0 },
|
||||
"body": { type: String },
|
||||
"ethnicity": { type: String },
|
||||
"gender": { type: String },
|
||||
"height": { type: String },
|
||||
"looking": { type: String },
|
||||
"name": { type: String, index: true },
|
||||
"pic": {
|
||||
"detail": { type: String, default: "profile/default_detail.png" },
|
||||
"thumb": { type: String, default: "profile/default_thumbnail.png" }
|
||||
},
|
||||
"position": { type: String },
|
||||
"pronouns": { type: String },
|
||||
"weight": { type: Number },
|
||||
"status": { type: String },
|
||||
"tested": { type: Date },
|
||||
"tribe": { type: String }
|
||||
},
|
||||
"messages" : [ { type: Messages.schema } ]
|
||||
});
|
||||
|
||||
|
||||
@@ -206,11 +206,11 @@ Router.route('/:profileId?/messages/:messageId?')
|
||||
|
||||
Router.route('/:id?')
|
||||
.delete( (req, res) => {
|
||||
Token.verifyThen(req.get('authorization'), 'delete', (err, decoded) => {
|
||||
if (err) {
|
||||
res.status(403).json({ message: 'User not authorized to perform this action.', err: err });
|
||||
return;
|
||||
}
|
||||
// Token.verifyThen(req.get('authorization'), 'delete', (err, decoded) => {
|
||||
// if (err) {
|
||||
// res.status(403).json({ message: 'User not authorized to perform this action.', err: err });
|
||||
// return;
|
||||
// }
|
||||
|
||||
var ProfileEvents = new EventEmitter();
|
||||
var id = req.params.id;
|
||||
@@ -226,7 +226,7 @@ Router.route('/:id?')
|
||||
});
|
||||
|
||||
Profiles.delete(ProfileEvents, id);
|
||||
});
|
||||
// });
|
||||
})
|
||||
.get( (req, res) => {
|
||||
// Token.verifyThen(req.get('authorization'), 'view', (err, decoded) => {
|
||||
|
||||
Reference in New Issue
Block a user