summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/admin/adopt.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/admin/adopt.go')
-rw-r--r--routers/api/v1/admin/adopt.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/routers/api/v1/admin/adopt.go b/routers/api/v1/admin/adopt.go
index 062cee6283..9c1b9fc0f8 100644
--- a/routers/api/v1/admin/adopt.go
+++ b/routers/api/v1/admin/adopt.go
@@ -5,7 +5,6 @@
package admin
import (
- "fmt"
"net/http"
"code.gitea.io/gitea/models"
@@ -47,8 +46,7 @@ func ListUnadoptedRepositories(ctx *context.APIContext) {
ctx.InternalServerError(err)
}
- ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", count))
- ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count")
+ ctx.SetTotalCountHeader(int64(count))
ctx.JSON(http.StatusOK, repoNames)
}