This repository was archived by the owner on Mar 13, 2025. It is now read-only.
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
Job
update and Resource Booking
update should use PATCH
instead of PUT
#283
Open
Description
In the TaaS App we have the ability to:
- Edit Job https://platform.topcoder-dev.com/taas/myteams/16873/positions/ecaf2c7f-2b43-4397-bcf5-0ddf38c7f6a6/edit
- Edit Resource Bookings https://platform.topcoder-dev.com/taas/myteams/16873/rb/f0738f2a-c837-42e3-acdf-0e1324d77e53/edit
Internally, when save update we use PUT
request:
- https://github.com/topcoder-platform/taas-app/blob/feature/fix-job-edit-permissions/src/services/jobs.js#L65
- https://github.com/topcoder-platform/taas-app/blob/feature/fix-job-edit-permissions/src/services/resourceBookings.js#L28
This appears to have a drawback. If we add some new field in the TaaS API but we don't update the form then fields that are not supported by the form would be reset to null
and cause issue like this topcoder-platform/taas-apis#260
Taks:
- we have to use
PATCH
requests instead ofPUT
to make it totally safe, so we never would lost any fields - we have to make sure that we still can clear data in the form for optional fields and the server would accept it and correctly clear that data