mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
API: Add Swagger annotations #2132
This commit is contained in:
@@ -30,8 +30,14 @@ const (
|
||||
|
||||
// StartImport imports media files from a directory and converts/indexes them as needed.
|
||||
//
|
||||
// @Summary start import
|
||||
// @Id StartImport
|
||||
// @Tags Library
|
||||
// @Router /api/v1/import/{path} [post]
|
||||
// @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})
|
||||
|
||||
@@ -21,7 +21,13 @@ import (
|
||||
|
||||
// StartIndexing indexes media files in the "originals" folder.
|
||||
//
|
||||
// @Summary start indexing
|
||||
// @Id StartIndexing
|
||||
// @Tags Library
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 400,401,403,429,500 {object} i18n.Response
|
||||
// @Param options body form.IndexOptions true "index options"
|
||||
// @Router /api/v1/index [post]
|
||||
func StartIndexing(router *gin.RouterGroup) {
|
||||
router.POST("/index", func(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user