Fixing a problem detected by a test case.
This commit is contained in:
parent
6967f5f4f0
commit
f6e3d43bd7
|
@ -56,9 +56,9 @@ exports.create = async function(ctx) {
|
|||
|
||||
ctx.status = 200
|
||||
ctx.message = "User created successfully."
|
||||
ctx.userId = response._id
|
||||
ctx.body = {
|
||||
_rev: response.rev,
|
||||
_id: user._id,
|
||||
username,
|
||||
name,
|
||||
}
|
||||
|
|
|
@ -71,7 +71,8 @@ module.exports.run = async function({ inputs, instanceId }) {
|
|||
await userController.create(ctx)
|
||||
return {
|
||||
response: ctx.body,
|
||||
id: ctx.body._id,
|
||||
// internal property not returned through the API
|
||||
id: ctx.userId,
|
||||
revision: ctx.body._rev,
|
||||
success: ctx.status === 200,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue