Skip to content

Commit 2799313

Browse files
committed
feat(api): added filters on genre & md5 for files api (#3127)
### Description Added filters for genre and md5 to the files API, e.g. `/api/v2/files?genre=soul` **This is a new feature**: Yes **I have updated the documentation to reflect these changes**: No There should be a schema and docs that are generated automatically. I don't know where that is. ### Testing Notes **What I did:** - Used docker to deploy locally - Confirmed filters work at http://localhost:8080/api/v2/files?genre=Soul **How you can replicate my testing:** - `make clean dev` - Upload some files! - Visit http://localhost:8080/api/v2/files - You can use the filters <img width="658" alt="Screenshot 2024-12-23 at 01 36 01" src="https://github.com/user-attachments/assets/ba19f7f3-fb3e-495d-8937-d451c70d326c" /> <img width="652" alt="Screenshot 2024-12-23 at 01 35 56" src="https://github.com/user-attachments/assets/c7191131-a963-463a-b52f-9d0952192555" /> _How can the reviewer validate this PR?_ - See above - wrote tests to confirm filters work libretime/libretime@b1bdd6d
1 parent e4a32b0 commit 2799313

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

schema.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,15 @@ paths:
154154
/api/v2/files:
155155
get:
156156
operationId: files_list
157+
parameters:
158+
- in: query
159+
name: genre
160+
schema:
161+
type: string
162+
- in: query
163+
name: md5
164+
schema:
165+
type: string
157166
tags:
158167
- files
159168
security:

0 commit comments

Comments
 (0)