Skip to content

Commit

Permalink
Merge pull request #94 from julichan/defect/change-password
Browse files Browse the repository at this point in the history
fixed change password feature
  • Loading branch information
AlexSciFier authored Dec 10, 2023
2 parents 3b19ffc + 9d2c616 commit b372f08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/reset-password.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function resetPassword(username, password) {
return;
}

updatePassword(user.id, password);
updatePassword(user, password);
console.log("Password changed!");
}

Expand Down
3 changes: 1 addition & 2 deletions server/routes/api/users/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,8 @@ export default async function (fastify, opts) {
schema: {
body: {
type: "object",
required: ["username", "currentPassword", "newPassword"],
required: ["currentPassword", "newPassword"],
properties: {
username: { type: "string" },
currentPassword: { type: "string" },
newPassword: { type: "string" },
},
Expand Down

0 comments on commit b372f08

Please sign in to comment.