add collection sugar

This commit is contained in:
2025-02-06 00:23:12 +01:00
parent 905b488fd4
commit 2791b6de76
8 changed files with 124 additions and 230 deletions

View File

@@ -105,8 +105,11 @@ paths:
- description: Index
in: query
name: index
required: true
type: integer
- description: Index
in: query
name: name
type: string
produces:
- application/json
responses:
@@ -127,47 +130,6 @@ paths:
summary: Get a collection of songs by index
tags:
- songs
/collections:
get:
consumes:
- application/json
description: Retrieves collections from the database with pagination based on
the query parameter
parameters:
- description: Search query
in: query
name: query
type: string
- default: 10
description: Limit the number of results
in: query
name: limit
type: integer
- default: 0
description: Offset for pagination
in: query
name: offset
type: integer
produces:
- application/json
responses:
"200":
description: List of collections
schema:
items:
$ref: '#/definitions/main.Collection'
type: array
"400":
description: Bad Request
schema:
type: string
"500":
description: Internal Server Error
schema:
type: string
summary: Retrieves collections based on a query
tags:
- search
/image/{filepath}:
get:
consumes: