Commit aaec46a3 authored by Steven's avatar Steven

chore: update find memo with updated time

parent 9c663b1b
...@@ -141,6 +141,14 @@ func (s *APIV2Service) ListMemos(ctx context.Context, request *apiv2pb.ListMemos ...@@ -141,6 +141,14 @@ func (s *APIV2Service) ListMemos(ctx context.Context, request *apiv2pb.ListMemos
memoFind.VisibilityList = []store.Visibility{store.Public, store.Protected} 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 { if request.Limit != 0 {
offset, limit := int(request.Offset), int(request.Limit) offset, limit := int(request.Offset), int(request.Limit)
memoFind.Offset = &offset memoFind.Offset = &offset
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment