LiturgicalCalendarAPI icon indicating copy to clipboard operation
LiturgicalCalendarAPI copied to clipboard

refactor resource creation / updating via PUT/PATCH/DELETE requests

Open JohnRDOrazio opened this issue 1 year ago • 5 comments

Now that we have a router and better API routes / paths in place, we need to rethink the shape of requests on the various paths that are aimed at creating resources or updating resources or even deleting resources via PUT, PATCH, and DELETE requests.

This will need to be done in tandem with the frontend.

JohnRDOrazio avatar Nov 20 '24 20:11 JohnRDOrazio

See Liturgical-Calendar/LiturgicalCalendarFrontend/issues/142

JohnRDOrazio avatar Nov 20 '24 20:11 JohnRDOrazio

Related issue #150

JohnRDOrazio avatar Nov 28 '24 22:11 JohnRDOrazio

Issue #150 is now complete. Once this issue is closed we will be able to close #220 as well.

JohnRDOrazio avatar Nov 30 '24 01:11 JohnRDOrazio

In order to better proceed with this issue, we need to clearly define the shape of the requests on each resource path for each request method.

The shape of the request should be defined both here in the API and on the client / frontend side.

JohnRDOrazio avatar Nov 30 '24 01:11 JohnRDOrazio

Here's a checklist to keep track of the state of things:

Roman Missal sanctorale data

  • [ ] /missals PUT
  • [ ] /missals/{missal_id} PATCH
  • [ ] /missals/{missal_id} DELETE

National Calendar data

  • [x] /data/nation PUT
  • [x] /data/nation/{country_id} PATCH
  • [x] /data/nation/{country_id} DELETE

Diocesan Calendar data

  • [x] /data/diocese PUT
  • [x] /data/diocese/{diocese_id} PATCH
  • [x] /data/diocese/{diocese_id} DELETE

Decrees of the Congregation for Divine Worship (for the General Roman Calendar)

  • [ ] /decrees PUT
  • [ ] /decrees/{decree_id} PATCH
  • [ ] /decrees/{decree_id} DELETE

Unit tests

  • [ ] /tests PUT
  • [ ] /tests/{test_id} PATCH
  • [ ] /tests/{test_id} DELETE

JohnRDOrazio avatar Dec 02 '24 00:12 JohnRDOrazio