Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename password field in registration form #45

Merged
merged 3 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@

### Releases

- v24.19-alpha2
- v24.19-alpha3
- ~~v24.19-alpha2~~
- v24.19-alpha

### Compatibility

No breaking changes, tested with Seacat Auth v24.17-beta2

### Fix

- Rename password field in registration form (#45, v24.19-alpha2, PLUM Sprint 240531)

### Features

- Advanced password validation in new user registration form (#44, v24.19-alpha2, PLUM Sprint 240531)
Expand Down
6 changes: 4 additions & 2 deletions src/modules/auth/containers/RegistrationCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ function RegistrationCard(props) {
filled input data (on press Save)
*/
const onSubmit = async (values) => {
let body = values;
delete body["password2"];
const body = values;
body.password = values.newpassword;
delete body.newpassword;
delete body.newpassword2;
Promise.all(Object.keys(body).map((key, i) => {
if ((body[key] == undefined) || (body[key].length == 0)) {
delete body[key];
Expand Down