Skip to content

Commit

Permalink
fix(lfs): fix lfs listlocks API and locksverify API nextCursor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zh1C committed Nov 9, 2023
1 parent 6035733 commit 8649365
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/lfs/locks.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func GetListLockHandler(ctx *context.Context) {
lockListAPI[i] = convert.ToLFSLock(ctx, l)
}
if limit > 0 && len(lockList) == limit {
next = strconv.Itoa(cursor + 1)
next = strconv.Itoa(cursor + limit)
}
ctx.JSON(http.StatusOK, api.LFSLockList{
Locks: lockListAPI,
Expand Down Expand Up @@ -259,7 +259,7 @@ func VerifyLockHandler(ctx *context.Context) {
}
next := ""
if limit > 0 && len(lockList) == limit {
next = strconv.Itoa(cursor + 1)
next = strconv.Itoa(cursor + limit)
}
lockOursListAPI := make([]*api.LFSLock, 0, len(lockList))
lockTheirsListAPI := make([]*api.LFSLock, 0, len(lockList))
Expand Down

0 comments on commit 8649365

Please sign in to comment.