Skip to content

Commit 0533af4

Browse files
authored
Merge pull request #176 from osamhack2021/hotfix/backend/#175
Hotfix: user ์กฐํฌ ์‹œ profileImageUrl ์กฐํšŒ ์•ˆ๋˜๋Š” ๋ฒ„๊ทธ์ˆ˜์ • #175
2 parents ce7ba42 + 8c1bcba commit 0533af4

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

โ€Žbackend/controllers/authController.jsโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module.exports = {
1616
group: true,
1717
email:true,
1818
tel: true,
19+
profileImageUrl:true,
1920
lastLogin:true,
2021
firstLogin:true,
2122
bookmarks:true,

โ€Žbackend/controllers/userController.jsโ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515

1616

1717
const projection = {
18-
_id: true, name: true, rank: true, status: true,
18+
_id: true, name: true, rank: true, status: true, profileImageUrl: true,
1919
group: true, email: true, tel: true, lastLogin: true
2020
};
2121

@@ -31,7 +31,7 @@ module.exports = {
3131

3232
let projection = {
3333
_id: true,serviceNumber:true, name: true, rank: true, title:true,
34-
status: true, group: true, email: true, tel: true, lastLogin: true,
34+
status: true, group: true, email: true, tel: true, profileImageUrl: true,
3535
lastLogin: true, firseLogin:true, bookmarks: true, subscriptions: true
3636
};
3737

@@ -40,8 +40,8 @@ module.exports = {
4040

4141
if(auth === 'general') {
4242
projection = {
43-
_id: true, name: true, rank: true, status: true,
44-
group: true, email: true, tel: true, lastLogin: true
43+
_id: true, name: true, rank: true, status: true,
44+
group: true, email: true, tel: true, lastLogin: true, profileImageUrl: true,
4545
};
4646
}
4747

@@ -66,7 +66,7 @@ module.exports = {
6666
const keys = Object.keys(req.body);
6767
const valids = ['password', 'name','name','rank',
6868
'title','status','group','email','tel',
69-
'lastLogin', 'firstLogin', 'bookmarks', 'subscriptions' ];
69+
'lastLogin', 'firstLogin', 'bookmarks', 'subscriptions' , 'profileImageUrl'];
7070

7171
// Only allowed fields are Searchable
7272
for(let key of keys) {

0 commit comments

Comments
ย (0)