Adds admin endpoints / routes for user (#36)
Adds all endpoints / routes for user operations Tweaks in UserService Adds update in UserService Fixes old tests
This commit is contained in:
1 parent
e3cdde3c9e
commit
a53822d298
27 files changed
+718
-22
No files matched your search
@@ -4,12 +4,12 @@ export const users = {
|
||||
testUser: {
|
||||
_id: IdMap.getId("test-user"),
|
||||
email: "oliver@medusa.test",
|
||||
passwordHash: "123456789",
|
||||
password_hash: "123456789",
|
||||
},
|
||||
permissionUser: {
|
||||
_id: IdMap.getId("permissions-user"),
|
||||
email: "oliver@medusa.com",
|
||||
passwordHash: "123456789",
|
||||
password_hash: "123456789",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ class UserModel extends BaseModel {
|
||||
static schema = {
|
||||
email: { type: String, required: true },
|
||||
name: { type: String },
|
||||
password_hash: { type: String },
|
||||
password_hash: { type: String, required: true },
|
||||
api_token: { type: String },
|
||||
metadata: { type: mongoose.Schema.Types.Mixed, default: {} },
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user