API: Add Swagger annotations #2132

This commit is contained in:
graciousgrey
2024-11-19 16:58:41 +01:00
parent 9d67f6f609
commit 076a400868
2 changed files with 16 additions and 4 deletions

View File

@@ -30,8 +30,14 @@ const (
// StartImport imports media files from a directory and converts/indexes them as needed.
//
// @Tags Library
// @Router /api/v1/import/{path} [post]
// @Summary start import
// @Id StartImport
// @Tags Library
// @Produce json
// @Success 200 {object} i18n.Response
// @Failure 400,401,403 {object} i18n.Response
// @Param options body form.ImportOptions true "import options"
// @Router /api/v1/import/ [post]
func StartImport(router *gin.RouterGroup) {
router.POST("/import/*path", func(c *gin.Context) {
s := AuthAny(c, acl.ResourceFiles, acl.Permissions{acl.ActionManage, acl.ActionUpload})