bagisto / rest-api

Bagisto REST API provides powerful and flexible endpoints to manage e-commerce operations, including products, orders, customers, and more.
22 stars 26 forks source link

Duplicate routes in Bagisto and Rest API #372

Closed JelleGroenendal closed 2 months ago

JelleGroenendal commented 3 months ago

We noticed a duplicate route naming with a clean install of Bagisto and Bagisto Rest API

packages/Webkul/Admin/src/Routes/reporting-routes.php Line 19: admin.reporting.customers.stats Line 34: admin.reporting.products.stats

vendor/bagisto/rest-api/src/Routes/V1/Admin/reporting-routes.php Line 26: admin.reporting.customers.stats Line 33: admin.reporting.products.stats

When we run php artisan optimize it results in:

In AbstractRouteCollection.php line 247:

Unable to prepare route [reporting/customers/stats] for serialization. Another route has already been assigned name [admin.reporting.customers.stats].

Failed to run artisan optimize: exit status 1

AliYazdanifar commented 2 months ago

I have the same error

Dansday commented 2 months ago

@devansh-webkul I have same error, can you help to check this

KharisG1234T commented 2 months ago

how to fix it?

devansh-webkul commented 2 months ago

We will fix it as soon as possible.

devansh-webkul commented 2 months ago

Fixed and provided v2.1.1 and v2.2.1.

KharisG1234T commented 2 months ago

Fixed and provided v2.1.1 and v2.2.1.

ok thx,it's work

KharisG1234T commented 2 months ago

image

but in configuration i got this error

amit-webkul commented 2 months ago

Hello @KharisG1234T ,

This issue is not coming from the REST API.

The error clearly states that the 'info' key is undefined in your configuration section. This means that in your packages -> Admin -> src -> Config -> system.php file, one of the arrays is missing the 'info' key, which is required.

Please check this, and you should be able to find the solution.

Thanks.