1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-21 08:31:27 -05:00

Fix incorrect internal response type (#24173)

Close #24167

The endpoint "set-default-branch" returns `success`, so just decode it
as `responseText`
This commit is contained in:
wxiaoguang 2023-04-18 11:10:40 +08:00 committed by GitHub
parent f82ee30097
commit 2979041bc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,7 +129,8 @@ func SetDefaultBranch(ctx context.Context, ownerName, repoName, branch string) R
url.PathEscape(branch),
)
req := newInternalRequest(ctx, reqURL, "POST")
return requestJSONUserMsg(req, "")
_, extra := requestJSONResp(req, &responseText{})
return extra
}
// SSHLog sends ssh error log response