diff --git a/server/routes/blaiseApi.ts b/server/routes/blaiseApi.ts index 2b38c37..7e17f72 100644 --- a/server/routes/blaiseApi.ts +++ b/server/routes/blaiseApi.ts @@ -110,7 +110,7 @@ export default function blaiseApi(config: CustomConfig, auth: Auth, blaiseApiCli auditLogger.error(req.log, "No user provided for deletion"); return res.status(400).json(); } - auditLogger.info(req.log, `${currentUser.name || "Unknown"} has successfully deleted user, ${user}`); + auditLogger.info(req.log, `${currentUser.name || "Unknown"} has successfully deleted user called ${user}`); return res.status(204).json(await blaiseApiClient.deleteUser(user)); } catch (error) { auditLogger.error(req.log, `Error whilst trying to delete user, ${req.headers.user}, with error message: ${error}`); diff --git a/server/tests/routes/blaiseApi.test.ts b/server/tests/routes/blaiseApi.test.ts index 6d3a03c..df0cc4a 100644 --- a/server/tests/routes/blaiseApi.test.ts +++ b/server/tests/routes/blaiseApi.test.ts @@ -172,7 +172,7 @@ describe("DELETE /api/users endpoint", () => { .set("user", username); const log = logInfo.mock.calls[0][0]; - expect(log).toEqual(`AUDIT_LOG: ${mockUser.name} has successfully deleted user, ${username}`); + expect(log).toEqual(`AUDIT_LOG: ${mockUser.name} has successfully deleted user called ${username}`); expect(response.statusCode).toEqual(204); blaiseApiMock.verify(a => a.deleteUser(It.isValue(username)), Times.once()); }); diff --git a/src/pages/users/UserProfileEdits/ChangePassword.tsx b/src/pages/users/UserProfileEdits/ChangePassword.tsx index f38daf2..e83409f 100644 --- a/src/pages/users/UserProfileEdits/ChangePassword.tsx +++ b/src/pages/users/UserProfileEdits/ChangePassword.tsx @@ -72,7 +72,7 @@ export default function ChangePassword(): ReactElement { currentUser, updatedPanel: { visible: true, - message: "Password for user " + viewedUsername + " changed at " + (new Date()).toLocaleTimeString("en-UK") + " " + (new Date()).toLocaleDateString("en-UK"), + message: "Password for user " + viewedUsername, status: "success" } }}