diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go index aa265db0af6..ac922bb2bdb 100644 --- a/routers/web/repo/repo.go +++ b/routers/web/repo/repo.go @@ -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 } diff --git a/services/context/api.go b/services/context/api.go index b1612903c67..3a3cbe670e4 100644 --- a/services/context/api.go +++ b/services/context/api.go @@ -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{} diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 283fd834c1f..753686ea994 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -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": {