mirror of
https://github.com/go-gitea/gitea.git
synced 2025-02-02 15:09:33 -05:00
api: remove APIGone and regen swagger template
also undo disabled stars check before sending StarUnstar template in Action() as the action already checks for it.
This commit is contained in:
parent
39a1b4c8cd
commit
10d9507ec1
@ -377,9 +377,7 @@ func Action(ctx *context.Context) {
|
||||
ctx.HTML(http.StatusOK, tplWatchUnwatch)
|
||||
return
|
||||
case "star", "unstar":
|
||||
if !setting.Repository.DisableStars {
|
||||
ctx.HTML(http.StatusOK, tplStarUnstar)
|
||||
}
|
||||
ctx.HTML(http.StatusOK, tplStarUnstar)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -89,12 +89,6 @@ type APINotFound struct{}
|
||||
// swagger:response conflict
|
||||
type APIConflict struct{}
|
||||
|
||||
// APIGone means the functionality has been disabled
|
||||
// swagger:response gone
|
||||
type APIGone struct {
|
||||
APIError
|
||||
}
|
||||
|
||||
// APIRedirect is a redirect response
|
||||
// swagger:response redirect
|
||||
type APIRedirect struct{}
|
||||
|
42
templates/swagger/v1_json.tmpl
generated
42
templates/swagger/v1_json.tmpl
generated
@ -13768,11 +13768,11 @@
|
||||
"200": {
|
||||
"$ref": "#/responses/UserList"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
},
|
||||
"410": {
|
||||
"$ref": "#/responses/gone"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -17510,8 +17510,8 @@
|
||||
"200": {
|
||||
"$ref": "#/responses/RepositoryList"
|
||||
},
|
||||
"410": {
|
||||
"$ref": "#/responses/gone"
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -17543,11 +17543,11 @@
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
},
|
||||
"410": {
|
||||
"$ref": "#/responses/gone"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -17582,9 +17582,6 @@
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
},
|
||||
"410": {
|
||||
"$ref": "#/responses/gone"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -17614,11 +17611,11 @@
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
},
|
||||
"410": {
|
||||
"$ref": "#/responses/gone"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -18293,11 +18290,11 @@
|
||||
"200": {
|
||||
"$ref": "#/responses/RepositoryList"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
},
|
||||
"410": {
|
||||
"$ref": "#/responses/gone"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -26629,17 +26626,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"gone": {
|
||||
"description": "APIGone means the functionality has been disabled",
|
||||
"headers": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"invalidTopicsError": {
|
||||
"description": "APIInvalidTopicsError is error format response to invalid topics",
|
||||
"headers": {
|
||||
|
Loading…
Reference in New Issue
Block a user