@@ -96,3 +96,11 @@ func (s *Server) GetImage(_ context.Context, req *proto.GetImageReq) (*httpbody.
|
||||
Data: data,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *Server) Search(ctx context.Context, req *proto.SearchReq) (*proto.PositionsRsp, error) {
|
||||
products, err := s.storage.GetPositionsByText(ctx, req.Text)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &proto.PositionsRsp{Products: products}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user