- Rid roles and get auth working
This commit is contained in:
@@ -8,22 +8,22 @@ const ProfileSchema = new Mongoose.Schema({
|
||||
"details": {
|
||||
"about": { type: String },
|
||||
"age": { type: Number, index: true, defaulrt: 0 },
|
||||
"body": { type: String },
|
||||
"ethnicity": { type: String },
|
||||
"body": { type: String, enum: ['slim','toned','average','muscular','large'] },
|
||||
"ethnicity": [{ type: String }],
|
||||
"gender": { type: String },
|
||||
"height": { type: String },
|
||||
"looking": { type: String },
|
||||
"looking": [{ type: String, enum: ['chat','friends','networking','dates','relationship','right now'] }],
|
||||
"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 },
|
||||
"position": [{ type: String, enum: ['bottom','vers bottom','versatile','vers top','top','foreplay only'] }],
|
||||
"pronouns": { type: String },
|
||||
"weight": { type: Number },
|
||||
"status": { type: String },
|
||||
"status": [{ type: String, enum: ['unknown','negative','negative, on prep','postive','positive, undetectable'] }],
|
||||
"tested": { type: Date },
|
||||
"tribe": { type: String }
|
||||
"tribe": [{ type: String, enum: [] }]
|
||||
},
|
||||
"messages" : [ { type: Messages.schema } ]
|
||||
});
|
||||
@@ -380,9 +380,9 @@ module.exports = {
|
||||
});
|
||||
},
|
||||
|
||||
get: (e, id) => {
|
||||
get: (e, profileId) => {
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
ProfileModel.findById(id, (err, result) => {
|
||||
ProfileModel.findById(profileId, (err, result) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
@@ -423,10 +423,10 @@ module.exports = {
|
||||
});
|
||||
},
|
||||
|
||||
update: (e, id, profile) => {
|
||||
update: (e, profileId, profile) => {
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
ProfileModel.findOneAndUpdate(
|
||||
{ _id: id },
|
||||
{ _id: profileId },
|
||||
{ $set: profile },
|
||||
{ new: true },
|
||||
(err, result) => {
|
||||
|
||||
Reference in New Issue
Block a user