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:
Oliver Windall Juhl authored and GitHub committed 2020-04-17 08:13:24 +02:00
1 parent e3cdde3c9e
commit a53822d298
27 files changed
+718 -22

No files matched your search

+2 -2
View File
@@ -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",
},
}
+2 -1
View File
@@ -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: {} },
}
}