박권수

Merge branch 'server' into web

...@@ -37,7 +37,7 @@ bottle.get('/feedback/:bottleId', bottleCtrl.getBottleFeedback); ...@@ -37,7 +37,7 @@ bottle.get('/feedback/:bottleId', bottleCtrl.getBottleFeedback);
37 37
38 /** 38 /**
39 * 약병에 약 등록 = 약 검색 후 약 ID(medicineId)와 복용 정보 보고 사용자가 약 복용량(dosage) 입력 39 * 약병에 약 등록 = 약 검색 후 약 ID(medicineId)와 복용 정보 보고 사용자가 약 복용량(dosage) 입력
40 - * request parameter : medicineId, dosage 40 + * request parameter : medicineId, dosage, doctorId
41 * url : http://localhost:4000/api/bottle/:bottleId 41 * url : http://localhost:4000/api/bottle/:bottleId
42 * return : bottle(json type) 42 * return : bottle(json type)
43 */ 43 */
......
...@@ -7,6 +7,7 @@ const ProfileSchema = new Schema({ ...@@ -7,6 +7,7 @@ const ProfileSchema = new Schema({
7 userNm : { type : String, required : true, }, 7 userNm : { type : String, required : true, },
8 userAge : { type : Number, required : true, }, 8 userAge : { type : Number, required : true, },
9 contact : { type : String, required : true, }, 9 contact : { type : String, required : true, },
10 + deviceToken : { type : String, default : null, },
10 }); 11 });
11 12
12 ProfileSchema.statics.findByUserId = function(userId) { 13 ProfileSchema.statics.findByUserId = function(userId) {
...@@ -21,5 +22,9 @@ ProfileSchema.methods.updateUserAge = function() { ...@@ -21,5 +22,9 @@ ProfileSchema.methods.updateUserAge = function() {
21 this.userAge = this.userAge + 1; 22 this.userAge = this.userAge + 1;
22 }; 23 };
23 24
25 +ProfileSchema.methods.updateDeviceToken = function(deviceToken) {
26 + this.deviceToken = deviceToken;
27 +};
28 +
24 29
25 module.exports = mongoose.model('Profile', ProfileSchema); 30 module.exports = mongoose.model('Profile', ProfileSchema);
...\ No newline at end of file ...\ No newline at end of file
......