mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: tweak filter checks
This commit is contained in:
@@ -793,12 +793,10 @@ func (s *APIV2Service) buildMemoFindWithFilter(ctx context.Context, find *store.
|
|||||||
if filter.RowStatus != nil {
|
if filter.RowStatus != nil {
|
||||||
find.RowStatus = filter.RowStatus
|
find.RowStatus = filter.RowStatus
|
||||||
}
|
}
|
||||||
} else {
|
} else if user == nil {
|
||||||
// If no filter is provided, check if the user is authenticated.
|
// If no filter is provided, check if the user is authenticated.
|
||||||
if user == nil {
|
|
||||||
return status.Errorf(codes.InvalidArgument, "filter is required")
|
return status.Errorf(codes.InvalidArgument, "filter is required")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// If the user is not authenticated, only public memos are visible.
|
// If the user is not authenticated, only public memos are visible.
|
||||||
if user == nil {
|
if user == nil {
|
||||||
|
Reference in New Issue
Block a user