We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f894cd commit 1d7e324Copy full SHA for 1d7e324
controllers/personal.js
@@ -91,6 +91,7 @@ module.exports = {
91
code: user.mobile.code,
92
number: user.mobile.number,
93
},
94
+ isAdmin: user.isAdmin,
95
96
};
97
ctx.response.status = 200;
@@ -137,6 +138,7 @@ module.exports = {
137
138
139
140
141
142
143
144
models/User.js
@@ -62,7 +62,10 @@ const UserSchema = new User({
62
rating: {
63
type: Number,
64
65
- isAdmin: false,
+ isAdmin: {
66
+ type: Boolean,
67
+ default: false,
68
+ },
69
token: String,
70
passwordHash: String,
71
salt: String,
0 commit comments