1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-13 14:07:20 +00:00

Only do counting when count_only=true for repo dashboard (#29884) (#29905)

Ref: #29878
Backport #29884

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Lunny Xiao
2024-03-20 11:02:35 +08:00
committed by GitHub
parent 408c92938b
commit 5f7b6b55a5
2 changed files with 15 additions and 11 deletions

View File

@ -236,7 +236,7 @@ const sfc = {
if (!this.reposTotalCount) {
const totalCountSearchURL = `${this.subUrl}/repo/search?count_only=1&uid=${this.uid}&team_id=${this.teamId}&q=&page=1&mode=`;
response = await GET(totalCountSearchURL);
this.reposTotalCount = response.headers.get('X-Total-Count');
this.reposTotalCount = response.headers.get('X-Total-Count') ?? '?';
}
response = await GET(searchedURL);