// GetProducts - getting products from local db
getting products from local db
// GetProducts - getting products from local db
func (h *Handler) GetProducts(ctx context.Context, req *pb.GetProductsRequest) (*pb.GetProductsResponse, error) {
	products, err := h.services.GetProducts(ctx, req)
	if err != nil {
		logrus.Errorf("get products fail: %s", err.Error())
		return nil, fmt.Errorf("get products fail: %w", err)
	}
	return &pb.GetProductsResponse{Product: products}, nil
}
func ( h * Handler ) GetProducts ( ctx context . Context , req * pb . GetProductsRequest ) ( * pb . GetProductsResponse , error ) { products , err := h . services . GetProducts ( ctx , req ) if err != nil { logrus . Errorf ( " " , err . Error ( ) ) return nil , fmt . Errorf ( " " , err ) } return & pb . GetProductsResponse { Product : products } , nil }
getting products from local db
getting products from local db