Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박권수
2021-09-07 17:52:05 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fa39674a24808b67199cd14cae0cff470aa6d907
fa39674a
1 parent
6b130034
feat. Profile Schema -> device token field
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
server/src/api/bottle/index.js
server/src/models/profile.js
server/src/api/bottle/index.js
View file @
fa39674
...
...
@@ -37,7 +37,7 @@ bottle.get('/feedback/:bottleId', bottleCtrl.getBottleFeedback);
/**
* 약병에 약 등록 = 약 검색 후 약 ID(medicineId)와 복용 정보 보고 사용자가 약 복용량(dosage) 입력
* request parameter : medicineId, dosage
* request parameter : medicineId, dosage
, doctorId
* url : http://localhost:4000/api/bottle/:bottleId
* return : bottle(json type)
*/
...
...
server/src/models/profile.js
View file @
fa39674
...
...
@@ -7,6 +7,7 @@ const ProfileSchema = new Schema({
userNm
:
{
type
:
String
,
required
:
true
,
},
userAge
:
{
type
:
Number
,
required
:
true
,
},
contact
:
{
type
:
String
,
required
:
true
,
},
deviceToken
:
{
type
:
String
,
default
:
null
,
},
});
ProfileSchema
.
statics
.
findByUserId
=
function
(
userId
)
{
...
...
@@ -21,5 +22,9 @@ ProfileSchema.methods.updateUserAge = function() {
this
.
userAge
=
this
.
userAge
+
1
;
};
ProfileSchema
.
methods
.
updateDeviceToken
=
function
(
deviceToken
)
{
this
.
deviceToken
=
deviceToken
;
};
module
.
exports
=
mongoose
.
model
(
'Profile'
,
ProfileSchema
);
\ No newline at end of file
...
...
Please
register
or
login
to post a comment