1
0
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:
HeCorr 2025-01-23 10:43:16 -03:00
parent 39a1b4c8cd
commit 10d9507ec1
No known key found for this signature in database
GPG Key ID: 9333B03459C34098
3 changed files with 15 additions and 37 deletions

View File

@ -377,9 +377,7 @@ func Action(ctx *context.Context) {
ctx.HTML(http.StatusOK, tplWatchUnwatch) ctx.HTML(http.StatusOK, tplWatchUnwatch)
return return
case "star", "unstar": case "star", "unstar":
if !setting.Repository.DisableStars { ctx.HTML(http.StatusOK, tplStarUnstar)
ctx.HTML(http.StatusOK, tplStarUnstar)
}
return return
} }

View File

@ -89,12 +89,6 @@ type APINotFound struct{}
// swagger:response conflict // swagger:response conflict
type APIConflict struct{} type APIConflict struct{}
// APIGone means the functionality has been disabled
// swagger:response gone
type APIGone struct {
APIError
}
// APIRedirect is a redirect response // APIRedirect is a redirect response
// swagger:response redirect // swagger:response redirect
type APIRedirect struct{} type APIRedirect struct{}

View File

@ -13768,11 +13768,11 @@
"200": { "200": {
"$ref": "#/responses/UserList" "$ref": "#/responses/UserList"
}, },
"403": {
"$ref": "#/responses/forbidden"
},
"404": { "404": {
"$ref": "#/responses/notFound" "$ref": "#/responses/notFound"
},
"410": {
"$ref": "#/responses/gone"
} }
} }
} }
@ -17510,8 +17510,8 @@
"200": { "200": {
"$ref": "#/responses/RepositoryList" "$ref": "#/responses/RepositoryList"
}, },
"410": { "403": {
"$ref": "#/responses/gone" "$ref": "#/responses/forbidden"
} }
} }
} }
@ -17543,11 +17543,11 @@
"204": { "204": {
"$ref": "#/responses/empty" "$ref": "#/responses/empty"
}, },
"403": {
"$ref": "#/responses/forbidden"
},
"404": { "404": {
"$ref": "#/responses/notFound" "$ref": "#/responses/notFound"
},
"410": {
"$ref": "#/responses/gone"
} }
} }
}, },
@ -17582,9 +17582,6 @@
}, },
"404": { "404": {
"$ref": "#/responses/notFound" "$ref": "#/responses/notFound"
},
"410": {
"$ref": "#/responses/gone"
} }
} }
}, },
@ -17614,11 +17611,11 @@
"204": { "204": {
"$ref": "#/responses/empty" "$ref": "#/responses/empty"
}, },
"403": {
"$ref": "#/responses/forbidden"
},
"404": { "404": {
"$ref": "#/responses/notFound" "$ref": "#/responses/notFound"
},
"410": {
"$ref": "#/responses/gone"
} }
} }
} }
@ -18293,11 +18290,11 @@
"200": { "200": {
"$ref": "#/responses/RepositoryList" "$ref": "#/responses/RepositoryList"
}, },
"403": {
"$ref": "#/responses/forbidden"
},
"404": { "404": {
"$ref": "#/responses/notFound" "$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": { "invalidTopicsError": {
"description": "APIInvalidTopicsError is error format response to invalid topics", "description": "APIInvalidTopicsError is error format response to invalid topics",
"headers": { "headers": {