Commit c9250772 authored by Steven's avatar Steven

chore: tweak filter checks

parent eb4f7b47
...@@ -793,11 +793,9 @@ func (s *APIV2Service) buildMemoFindWithFilter(ctx context.Context, find *store. ...@@ -793,11 +793,9 @@ 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.
......
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