Skip to content

Commit

Permalink
Fix for failing lastUpdated query
Browse files Browse the repository at this point in the history
  • Loading branch information
mrusme committed Dec 14, 2022
1 parent cb8d648 commit 4ead28b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/v1/bookmarks/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ func (h *handler) Update(ctx *fiber.Ctx) error {
Update().
Where(bookmark.And(
bookmark.ID(id),
bookmark.LastUpdated(lastUpdated.Truncate(time.Millisecond)),
bookmark.LastUpdatedGTE(lastUpdated.Add(time.Second*-1)),
bookmark.LastUpdatedLTE(lastUpdated.Add(time.Second*1)),
)).
SetBookmarks(updateBookmark.Bookmarks).
SetLastUpdated(now).
Expand Down

0 comments on commit 4ead28b

Please sign in to comment.