diff --git a/packages/server/src/api/controllers/user.js b/packages/server/src/api/controllers/user.js index 5cdfb68d8f..1afd120e4a 100644 --- a/packages/server/src/api/controllers/user.js +++ b/packages/server/src/api/controllers/user.js @@ -48,7 +48,6 @@ exports.create = async function(ctx) { ctx.body = { _rev: response.rev, email, - name, } } catch (err) { if (err.status === 409) { diff --git a/packages/server/src/api/routes/tests/user.spec.js b/packages/server/src/api/routes/tests/user.spec.js index 94dcb6c63c..e6f6795e52 100644 --- a/packages/server/src/api/routes/tests/user.spec.js +++ b/packages/server/src/api/routes/tests/user.spec.js @@ -48,7 +48,7 @@ describe("/users", () => { }) it("should apply authorization to endpoint", async () => { - await createUser(request, appId, "brenda", "brendas_password") + await createUser(request, appId, "brenda@brenda.com", "brendas_password") await testPermissionsForEndpoint({ request, method: "GET", @@ -62,12 +62,11 @@ describe("/users", () => { }) describe("create", () => { - it("returns a success message when a user is successfully created", async () => { const res = await request .post(`/api/users`) .set(defaultHeaders(appId)) - .send({ name: "Bill", email: "bill@bill.com", password: "bills_password", accessLevelId: BUILTIN_LEVEL_IDS.POWER }) + .send({ email: "bill@bill.com", password: "bills_password", accessLevelId: BUILTIN_LEVEL_IDS.POWER }) .expect(200) .expect('Content-Type', /json/) @@ -79,7 +78,7 @@ describe("/users", () => { await testPermissionsForEndpoint({ request, method: "POST", - body: { name: "brandNewUser", email: "brandNewUser@user.com", password: "yeeooo", accessLevelId: BUILTIN_LEVEL_IDS.POWER }, + body: { email: "brandNewUser@user.com", password: "yeeooo", accessLevelId: BUILTIN_LEVEL_IDS.POWER }, url: `/api/users`, appId: appId, permName1: BUILTIN_PERMISSION_NAMES.ADMIN,