Fix: rename 'username' to 'name' in account creation API calls (web side, #955)#996
Open
mircealungu wants to merge 2 commits intomasterfrom
Open
Fix: rename 'username' to 'name' in account creation API calls (web side, #955)#996mircealungu wants to merge 2 commits intomasterfrom
mircealungu wants to merge 2 commits intomasterfrom
Conversation
The addUser and addBasicUser API calls were sending the user's display name as the 'username' form parameter, but the User model, DB column, settings endpoint, and API response all use 'name'. Renaming the HTTP parameter to 'name' makes the frontend consistent with the rest of the stack. Must be applied together with the matching API change. Closes #955
Remove a leftover debug log with a typo ('GOT SESSOIN') from the logIn
response handler that was logging session data to the console.
✅ Deploy Preview for voluble-nougat-015dd1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the naming inconsistency described in #955.
The
addUserandaddBasicUserAPI calls were sending the user's display name as theusernameHTTP form parameter. However everywhere else in the stack — the User model, DB column, settings endpoint, and API JSON response — the field is calledname.This renames the outgoing form parameter from
usernametonamein both API calls.Must be merged together with the matching API-side PR in zeeguu/api (also on branch
auto-fix/issue-955-api).Closes #955
Commits
Fix commit (
d7aea56): Rename&username=→&name=inaddUserandaddBasicUserinsrc/api/accounts.js.Cleanup commit (
4adc798): Remove leftover debugconsole.log("GOT SESSOIN: " + data)(typo and all) from thelogInresponse handler (boy scout rule).