Add more check for stopwatch read or list (#36340)

This commit is contained in:
Lunny Xiao
2026-01-13 05:13:39 -08:00
committed by GitHub
parent ed5720af2a
commit 95ea2df00a
9 changed files with 160 additions and 7 deletions

View File

@@ -224,7 +224,7 @@ func GetStopwatches(ctx *context.APIContext) {
return
}
apiSWs, err := convert.ToStopWatches(ctx, sws)
apiSWs, err := convert.ToStopWatches(ctx, ctx.Doer, sws)
if err != nil {
ctx.APIErrorInternal(err)
return

View File

@@ -29,7 +29,7 @@ func GetStopwatches(ctx *context.Context) {
return
}
apiSWs, err := convert.ToStopWatches(ctx, sws)
apiSWs, err := convert.ToStopWatches(ctx, ctx.Doer, sws)
if err != nil {
ctx.HTTPError(http.StatusInternalServerError, err.Error())
return