mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update find memo with updated time
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user