Skip to content

Commit 10d9507

Browse files
committed
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.
1 parent 39a1b4c commit 10d9507

File tree

3 files changed

+15
-37
lines changed

3 files changed

+15
-37
lines changed

routers/web/repo/repo.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,7 @@ func Action(ctx *context.Context) {
377377
ctx.HTML(http.StatusOK, tplWatchUnwatch)
378378
return
379379
case "star", "unstar":
380-
if !setting.Repository.DisableStars {
381-
ctx.HTML(http.StatusOK, tplStarUnstar)
382-
}
380+
ctx.HTML(http.StatusOK, tplStarUnstar)
383381
return
384382
}
385383

services/context/api.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,6 @@ type APINotFound struct{}
8989
// swagger:response conflict
9090
type APIConflict struct{}
9191

92-
// APIGone means the functionality has been disabled
93-
// swagger:response gone
94-
type APIGone struct {
95-
APIError
96-
}
97-
9892
// APIRedirect is a redirect response
9993
// swagger:response redirect
10094
type APIRedirect struct{}

templates/swagger/v1_json.tmpl

Lines changed: 14 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)