mirror of
https://github.com/usememos/memos.git
synced 2025-04-02 20:10:45 +02:00
chore: update find memo with updated time
This commit is contained in:
parent
9c663b1ba2
commit
aaec46a39c
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user