From b87465f77659c496fc923a03f64df946423696e4 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 2 Jan 2020 05:28:40 +0100 Subject: [PATCH] Backend: Fix index API after refactoring Signed-off-by: Michael Mayer --- internal/api/index.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/api/index.go b/internal/api/index.go index da8bc1653..840ea7799 100644 --- a/internal/api/index.go +++ b/internal/api/index.go @@ -38,9 +38,9 @@ func initNsfwDetector(conf *config.Config) { nd = nsfw.NewDetector(conf.NSFWModelPath()) } -// POST /api/v1/ind +// POST /api/v1/index func StartIndexing(router *gin.RouterGroup, conf *config.Config) { - router.POST("/ind", func(c *gin.Context) { + router.POST("/index", func(c *gin.Context) { if Unauthorized(c, conf) { c.AbortWithStatusJSON(http.StatusUnauthorized, ErrUnauthorized) return @@ -88,9 +88,9 @@ func StartIndexing(router *gin.RouterGroup, conf *config.Config) { }) } -// DELETE /api/v1/ind +// DELETE /api/v1/index func CancelIndexing(router *gin.RouterGroup, conf *config.Config) { - router.DELETE("/ind", func(c *gin.Context) { + router.DELETE("/index", func(c *gin.Context) { if Unauthorized(c, conf) { c.AbortWithStatusJSON(http.StatusUnauthorized, ErrUnauthorized) return