Skip to content

Implement write endpoints as generic CRUD resources #120

@rikedyp

Description

@rikedyp

Implement the redesigned REST write endpoints for the simple table resources: person, organisation, event, event_type, presentation_type, category. Might want one for every table.

Each gets three routes:

  • POST /{resource} — create (insert)
  • PATCH /{resource}/{id} — update
  • DELETE /{resource}/{id} — delete

Refactor import.Table (currently a single upsert function) into separate create/update/delete handlers.

Decide on the :Hold 'SQL.db' lock: keep the global lock for now or narrow it per-table.

To do:

  • POST/PATCH/DELETE routes
  • OpenAPI request/response schemas attached
  • Auth enforced on all write routes
  • Database write lock prevents concurrent writes to the same table
  • Create returns 201, Update returns 200, Delete returns 204

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions