Skip to content

Commit

Permalink
chore: change /syms/rescan from POST to PUT
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Sep 26, 2024
1 parent e8ae85e commit b236da9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions api/server/routes/syms/syms.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func AddRoutes(rg *gin.RouterGroup, db db.Database, pemDB, sigsDir string) {
}
c.JSON(http.StatusOK, successResponse{Success: true})
})
// swagger:route POST /syms/rescan Syms postRescan
// swagger:route PUT /syms/rescan Syms putRescan
//
// Rescan
//
Expand Down Expand Up @@ -134,7 +134,7 @@ func AddRoutes(rg *gin.RouterGroup, db db.Database, pemDB, sigsDir string) {
// Responses:
// 200: successResponse
// 500: genericError
rg.POST("/syms/rescan", func(c *gin.Context) {
rg.PUT("/syms/rescan", func(c *gin.Context) {
ipswPath, ok := c.GetQuery("path")
if !ok {
c.AbortWithStatusJSON(http.StatusBadRequest, types.GenericError{Error: "missing path query parameter"})
Expand Down
4 changes: 2 additions & 2 deletions api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@
}
},
"/syms/rescan": {
"post": {
"put": {
"description": "Rescan symbols for a given IPSW.",
"produces": [
"application/json"
Expand All @@ -1568,7 +1568,7 @@
"Syms"
],
"summary": "Rescan",
"operationId": "postRescan",
"operationId": "putRescan",
"parameters": [
{
"type": "string",
Expand Down
4 changes: 2 additions & 2 deletions www/static/api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@
}
},
"/syms/rescan": {
"post": {
"put": {
"description": "Rescan symbols for a given IPSW.",
"produces": [
"application/json"
Expand All @@ -1568,7 +1568,7 @@
"Syms"
],
"summary": "Rescan",
"operationId": "postRescan",
"operationId": "putRescan",
"parameters": [
{
"type": "string",
Expand Down

0 comments on commit b236da9

Please sign in to comment.