mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
API: Add code comments
This commit is contained in:
@@ -21,6 +21,8 @@ import (
|
||||
"github.com/photoprism/photoprism/pkg/txt"
|
||||
)
|
||||
|
||||
// StartImport imports media files from a directory and converts/indexes them as needed.
|
||||
//
|
||||
// POST /api/v1/import*
|
||||
func StartImport(router *gin.RouterGroup) {
|
||||
router.POST("/import/*path", func(c *gin.Context) {
|
||||
@@ -118,6 +120,8 @@ func StartImport(router *gin.RouterGroup) {
|
||||
})
|
||||
}
|
||||
|
||||
// CancelImport stops the current import operation.
|
||||
//
|
||||
// DELETE /api/v1/import
|
||||
func CancelImport(router *gin.RouterGroup) {
|
||||
router.DELETE("/import", func(c *gin.Context) {
|
||||
|
||||
@@ -16,6 +16,8 @@ import (
|
||||
"github.com/photoprism/photoprism/pkg/txt"
|
||||
)
|
||||
|
||||
// StartIndexing indexes media files in the "originals" folder.
|
||||
//
|
||||
// POST /api/v1/index
|
||||
func StartIndexing(router *gin.RouterGroup) {
|
||||
router.POST("/index", func(c *gin.Context) {
|
||||
@@ -100,6 +102,8 @@ func StartIndexing(router *gin.RouterGroup) {
|
||||
})
|
||||
}
|
||||
|
||||
// CancelIndexing stops indexing media files in the "originals" folder.
|
||||
//
|
||||
// DELETE /api/v1/index
|
||||
func CancelIndexing(router *gin.RouterGroup) {
|
||||
router.DELETE("/index", func(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user