Modify update extension setting endpoint to account for `settings_context_hash`
MR: Update Settings Sync endpoints to account for s... (!172748 - merged)
Description
We want to look up extensions setting for a user based on the extensions marketplace context, which is passed in the Settings Sync URL as the settings_context_hash path parameter (added in Add optional namespace to Settings Sync API URL (#501272)). To do so, we need to store the settings_context_hash when creating or updating extensions settings.
NOTE: The settings_context_hash is only considered when the setting type is extensions. Otherwise we read/write to the "default"/nil one is.
Acceptance Criteria
-
When creating/updating an extensions setting with settings_context_hashin the path param, the param is stored in thevs_code_settingstable. -
When creating/updating an extensions setting without settings_context_hashin the path param, the field in the table is nil. -
No duplicates should be created when a record with the same settings_context_hashexists. -
The above applies to extensions setting type only. Other setting types will have the default settings_context_hashvalue of nil. -
Note: Let's consider adding integration/request spec either here or in Modify get extension endpoints to account for `... (#501285 - closed).
Technical Requirements
-
Modify the update resource endpoint such we store the settings_context_hashparameter when creating or updating the row if the setting type isextensions. -
We also want to make sure we don’t change the UUID on extensions setting updates by modifying this logic.
Edited by Cindy Halim