Skip to content

[BUG]: DELETE /api/checklists/{uuid} returns "List not found" despite checklist existing #483

@alienos

Description

@alienos

Describe the bug

Description:
When using the API key authentication (x-api-key header), the DELETE endpoint for checklists always returns {"error":"List not found"} regardless of whether the checklist exists and belongs to the authenticated user.

Steps to reproduce:

  1. Create a new checklist via POST /api/checklists (works fine)
  2. Verify the checklist exists via GET /api/checklists (returns the checklist with valid UUID)
  3. Attempt to delete via DELETE /api/checklists/{uuid} (fails with "List not found")
  4. Adding items to the checklist via POST /api/checklists/{uuid}/items works fine

Expected behavior:
DELETE should remove the checklist or return appropriate error if user lacks permission.

Actual behavior:
DELETE /api/checklists/{uuid} returns {"error":"List not found"} even for freshly created checklists owned by the authenticated user.

Environment:

  • Jotty version: 1.21.1 (docker self-hosted)
  • Authentication: API key (x-api-key header)

Notes:

  • GET /api/checklists works correctly
  • POST /api/checklists creates checklists successfully
  • DELETE /api/notes/{uuid} for notes works fine
  • Only the checklists DELETE endpoint appears broken

Steps to Reproduce

Steps to reproduce:

  1. Create a new checklist via POST /api/checklists (works fine)
  2. Verify the checklist exists via GET /api/checklists (returns the checklist with valid UUID)
  3. Attempt to delete via DELETE /api/checklists/{uuid} (fails with "List not found")
  4. Adding items to the checklist via POST /api/checklists/{uuid}/items works fine

Expected behavior:
DELETE should remove the checklist or return appropriate error if user lacks permission.

How do you run Jotty?

Docker

Jotty Version

1.21.1

Checklist

  • I have searched across other issues to make sure this bug has not been already reported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThis has been accepted and will be worked on

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions