Skip to content

Commit

Permalink
Merge pull request #73 from wg-lesta/patch-1
Browse files Browse the repository at this point in the history
Locks Verification Fix
  • Loading branch information
ttaylorr authored Feb 1, 2018
2 parents c7e6bd5 + 28242cb commit 81369c2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,17 @@ func (a *App) LocksVerifyHandler(w http.ResponseWriter, r *http.Request) {
enc.Encode(&VerifiableLockList{Message: err.Error()})
return
}

// Limit is optional
limit := reqBody.Limit
if limit == 0 {
limit = 100
}

ll := &VerifiableLockList{}
locks, nextCursor, err := a.metaStore.FilteredLocks(repo, "",
reqBody.Cursor,
strconv.Itoa(reqBody.Limit))
strconv.Itoa(limit))
if err != nil {
ll.Message = err.Error()
} else {
Expand Down

0 comments on commit 81369c2

Please sign in to comment.