Create API endpoint for subarea edit
- Dominant language
- JavaScript
- Stars
- 2
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Description:
Create an endpoint to edit subareas. This is to support the front end changes requested to edit subareas.
Fields that can be edited on a subarea:
- Region
- Section
- Management Area
- Bundle
- Subarea name
- Activities (though there must be at least one activity selected).
It should be verified before this happens that editing a subarea is indeed possible without creating data issues. Many activity records are generated from a template based on the subarea, so if the subarea is changed, will it/should it affect past records?
When creating a subarea, a config object must also be created, so when the subarea is edited, the config object must also change.
The subareaId will not be allowed to be changed since by DynamoDB rules this would require recreating the object instead of updating it. Because of this, there is no need to update the KeyCloak roles for the subarea when it is edited.
Context:
Links to other resources/docs:
Screenshots (if applicable):
Changes:
- ORCS Number:
- Region:
- Section:
- Management Area:
- Bundle:
- Park:
- Park Sub Area:
- Requested Change:
Contributor guide
No contributing guide indexed for this repository
Research direction
No files or tests are named. Start by locating the existing subarea creation endpoint and the code that creates its config object, then trace how activity records depend on subareas. Done means the endpoint edits the listed fields, preserves the subareaId, keeps the config synchronized, enforces at least one activity, and resolves the impact on past records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript, nodejs
- Domain
- api, backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100