From 451de79666080f726f3b348870617e1a96c01a20 Mon Sep 17 00:00:00 2001 From: Christoph Fiehe Date: Fri, 18 Oct 2024 14:54:44 +0200 Subject: [PATCH] Improve consistency between API and Swagger docs. Signed-off-by: Christoph Fiehe --- api/publish.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/publish.go b/api/publish.go index b7aa3a87..f5d27fb2 100644 --- a/api/publish.go +++ b/api/publish.go @@ -177,7 +177,7 @@ type publishedRepoCreateParams struct { // @Consume json // @Param request body publishedRepoCreateParams true "Parameters" // @Produce json -// @Success 200 {object} deb.PublishedRepo +// @Success 201 {object} deb.PublishedRepo // @Failure 400 {object} Error "Bad Request" // @Failure 404 {object} Error "Source not found" // @Failure 500 {object} Error "Internal Error" @@ -575,7 +575,7 @@ func apiPublishDrop(c *gin.Context) { // @Consume json // @Param request body sourceParams true "Parameters" // @Produce json -// @Success 200 +// @Success 201 // @Failure 400 {object} Error "Bad Request" // @Failure 404 {object} Error "Published repository not found" // @Failure 500 {object} Error "Internal Error" @@ -628,7 +628,7 @@ func apiPublishAddSource(c *gin.Context) { return &task.ProcessReturnValue{Code: http.StatusInternalServerError, Value: nil}, fmt.Errorf("unable to save to DB: %s", err) } - return &task.ProcessReturnValue{Code: http.StatusCreated, Value: published}, nil + return &task.ProcessReturnValue{Code: http.StatusCreated, Value: gin.H{}}, nil }) }