quru / qis

Dynamic image server for web and print
https://quruimageserver.com
GNU Affero General Public License v3.0
90 stars 7 forks source link

API - don't return deleted records by default #12

Closed fozcode closed 5 years ago

fozcode commented 5 years ago

The folder list admin function returns deleted records (need to check the file admin for this too). This doesn't seem like a sensible default, so change it to filter by status<>0, controlled by a new optional boolean parameter for whether to return soft-deleted data (or perhaps an optional status filter parameter would be better?)

Technically this is a breaking change but I don't think it was ever intended to work this way and should have filtered out deleted records from day 1. Nothing much can be done with the deleted records as the associated physical files are gone, so I don't expect this change to break any existing code.

fozcode commented 5 years ago

We will need to update the GET/list functions for admin/users, filesystem/images, and filesystem/folders. Each should take an optional query string parameter/filter status that can be:

For users the admin area will need to set ?status=any so that it continues to display deleted users as at present. Or we could add a new checkbox for whether to show deleted users.