From 2dac471b2fe76563fde7f895f0ce181d11d38618 Mon Sep 17 00:00:00 2001 From: Richard Grant <79340673+RichardGrant-93@users.noreply.github.com> Date: Sun, 21 Feb 2021 02:20:05 -0800 Subject: [PATCH 1/2] richard.grant/row-update-user-update-password-fix update existing user password and login fix --- packages/server/src/api/controllers/row.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/row.js b/packages/server/src/api/controllers/row.js index 904dd08ed1..1772b88e7e 100644 --- a/packages/server/src/api/controllers/row.js +++ b/packages/server/src/api/controllers/row.js @@ -92,7 +92,10 @@ exports.patch = async function(ctx) { // Creation of a new user goes to the user controller if (row.tableId === ViewNames.USERS) { // the row has been updated, need to put it into the ctx - ctx.request.body = row + ctx.request.body = { + ...row, + password: ctx.request.body.password + } await usersController.update(ctx) return } From 8ed6dbb31237ba69aec4d668e0f32f43a24d0f31 Mon Sep 17 00:00:00 2001 From: Richard Grant <79340673+RichardGrant-93@users.noreply.github.com> Date: Sun, 21 Feb 2021 02:27:04 -0800 Subject: [PATCH 2/2] lint fix lint complaint fix --- packages/server/src/api/controllers/row.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/row.js b/packages/server/src/api/controllers/row.js index 1772b88e7e..3739ec9493 100644 --- a/packages/server/src/api/controllers/row.js +++ b/packages/server/src/api/controllers/row.js @@ -94,7 +94,7 @@ exports.patch = async function(ctx) { // the row has been updated, need to put it into the ctx ctx.request.body = { ...row, - password: ctx.request.body.password + password: ctx.request.body.password, } await usersController.update(ctx) return