Repository navigation
Add UserDictionaryResource (User Presets Step 1) - #1147
Merged
Merged
Conversation
Yicong-Huang
approved these changes
Jun 5, 2021
Yicong-Huang
left a comment
Contributor
There was a problem hiding this comment.
LGTM, please take care of the comments in code.
MysteriousChallenger
force-pushed
the
Albert-UserDictionaryResource
branch
from
June 6, 2021 01:58
b46f6d4 to
64fbe98
Compare
Contributor
Author
|
Turns out XHR (browser side api for http requests) doesn't allow get requests to have a body, despite generating content-type/length headers and allowing me to do so in the inspector panel (which I had used to test the backend before working on the frontend). I've changed all the GET requests to POST requests. This also meant I had to change the API path to /users/dictionary/{get|set|delete} for the get set delete operations, since I couldn't differentiate them by http method anymore |
adds user_dictionary database table and JOOQ generated DAOs and POJOs user_dictionary stores uid+key -> json-value pairs, storing arbitrary json data for each user
fixed sql formatting, capitalized error messages, fixed edge case of missing json properties in requests
turns out XHR doesn't allow get requests to have a body, despite generating content-type/length headers and it being allowed in the inspector.
Yicong-Huang
force-pushed
the
Albert-UserDictionaryResource
branch
from
June 17, 2021 07:56
0b57e66 to
fd4fd97
Compare
Yicong-Huang
approved these changes
Jun 17, 2021
Yicong-Huang
left a comment
Contributor
There was a problem hiding this comment.
In general it looks good. it is hard to test as it only contains the backend. Please address some minor comments in code.
2 of 3 tasks
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
This PR is extracted from apache#1041 as step 1 of the User Preset feature. rebase of picked commits pertaining to UserDictionaryResource onto master UserDictionaryResource provides a "_dictionary_", a persistent collection of string (key, value) pairs for each user. Its API is located at /api/users/dictionary. functionality includes get/set/delete, mapped to the GET/POST/DELETE HTTP methods. Changes from last review (for Yicong) - now only consumes and produces application/json - CODE 422 Unprocessable Entity replaces 400 bad request if user provides well formed request that cannot be fulfilled - I.E well-formed DELETE request when there is nothing to delete - No more confusing json validation: key/values are always strings (previously was trying to store them in MySQL json column, now using text column) - user/login check first - Unused imports removed - using orNull instead of getOrElse(null) - removed extraneous _return_ Co-authored-by: Yicong Huang <[email protected]>
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.
This PR is extracted from #1041 as step 1 of the User Preset feature.
rebase of picked commits pertaining to UserDictionaryResource onto master
UserDictionaryResource provides a "dictionary", a persistent collection of string (key, value) pairs for each user.
Its API is located at /api/users/dictionary.
functionality includes get/set/delete, mapped to the GET/POST/DELETE HTTP methods.
Changes from last review (for Yicong)