diff --git a/api/server/routes/syms/syms.go b/api/server/routes/syms/syms.go index 2240e0a05..8a2c193ad 100644 --- a/api/server/routes/syms/syms.go +++ b/api/server/routes/syms/syms.go @@ -20,6 +20,11 @@ type successResponse struct { Success bool `json:"success,omitempty"` } +// swagger:response +type createdResponse struct { + Created bool `json:"created,omitempty"` +} + // swagger:response type symIpswResponse *model.Ipsw @@ -132,7 +137,7 @@ func AddRoutes(rg *gin.RouterGroup, db db.Database, pemDB, sigsDir string) { // required: false // type: string // Responses: - // 200: successResponse + // 201: createdResponse // 500: genericError rg.PUT("/syms/rescan", func(c *gin.Context) { ipswPath, ok := c.GetQuery("path") @@ -162,7 +167,7 @@ func AddRoutes(rg *gin.RouterGroup, db db.Database, pemDB, sigsDir string) { c.AbortWithStatusJSON(http.StatusInternalServerError, types.GenericError{Error: err.Error()}) return } - c.JSON(http.StatusOK, successResponse{Success: true}) + c.JSON(http.StatusCreated, createdResponse{Created: true}) }) // swagger:route GET /syms/ipsw Syms getIPSW //