mirror of
https://github.com/usememos/memos.git
synced 2025-02-27 23:05:04 +08:00
chore: update find memo with updated time
This commit is contained in:
parent
9c663b1ba2
commit
aaec46a39c
1 changed files with 8 additions and 0 deletions
|
@ -141,6 +141,14 @@ func (s *APIV2Service) ListMemos(ctx context.Context, request *apiv2pb.ListMemos
|
|||
memoFind.VisibilityList = []store.Visibility{store.Public, store.Protected}
|
||||
}
|
||||
|
||||
memoDisplayWithUpdatedTs, err := s.getMemoDisplayWithUpdatedTsSettingValue(ctx)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get memo display with updated ts setting value")
|
||||
}
|
||||
if memoDisplayWithUpdatedTs {
|
||||
memoFind.OrderByUpdatedTs = true
|
||||
}
|
||||
|
||||
if request.Limit != 0 {
|
||||
offset, limit := int(request.Offset), int(request.Limit)
|
||||
memoFind.Offset = &offset
|
||||
|
|
Loading…
Reference in a new issue