diff --git a/src/routes/test/apps-test.js b/src/routes/test/apps-test.js index ec4985dbf..00fb73aa8 100644 --- a/src/routes/test/apps-test.js +++ b/src/routes/test/apps-test.js @@ -182,7 +182,7 @@ describe('Apps', function () { .end(function (err, res) { expect(res.statusCode).to.equal(201); - USER_1_ID = res.body.userInfo.id; + USER_1_ID = res.body.id; callback(null); }); diff --git a/src/routes/test/groups-test.js b/src/routes/test/groups-test.js index 0991d0eff..a6be935b6 100644 --- a/src/routes/test/groups-test.js +++ b/src/routes/test/groups-test.js @@ -70,7 +70,7 @@ function setup(done) { expect(result.statusCode).to.eql(201); token_1 = tokendb.generateToken(); - userId_1 = result.body.userInfo.id; + userId_1 = result.body.id; // HACK to get a token for second user (passwords are generated and the user should have gotten a password setup link...) tokendb.add(token_1, userId_1, 'test-client-id', Date.now() + 100000, '*', callback); diff --git a/src/routes/test/user-test.js b/src/routes/test/user-test.js index 5fcf710e7..fb3654251 100644 --- a/src/routes/test/user-test.js +++ b/src/routes/test/user-test.js @@ -260,7 +260,7 @@ describe('User API', function () { expect(error).to.not.be.ok(); expect(result.statusCode).to.equal(201); - user_1 = result.body.userInfo; + user_1 = result.body; checkMails(2, function () { // HACK to get a token for second user (passwords are generated and the user should have gotten a password setup link...) @@ -380,7 +380,7 @@ describe('User API', function () { .end(function (error, result) { expect(result.statusCode).to.equal(201); - user_2 = result.body.userInfo; + user_2 = result.body; superagent.post(SERVER_URL + '/api/v1/users') .query({ access_token: token }) @@ -388,7 +388,7 @@ describe('User API', function () { .end(function (error, result) { expect(result.statusCode).to.equal(201); - user_3 = result.body.userInfo; + user_3 = result.body; // one mail for first user creation, two mails for second user creation (see 'invite' flag) checkMails(3, function () { diff --git a/src/routes/user.js b/src/routes/user.js index b5d9d7f9c..cc3c4809d 100644 --- a/src/routes/user.js +++ b/src/routes/user.js @@ -80,7 +80,7 @@ function createUser(req, res, next) { resetToken: user.resetToken }; - next(new HttpSuccess(201, { userInfo: userInfo })); + next(new HttpSuccess(201, userInfo )); }); }