mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Fix wrong router loop
This commit is contained in:
parent
7259bc54f6
commit
2013164680
@ -47,12 +47,11 @@ module.exports = strapi => {
|
||||
_.forEach(api.routes, route => {
|
||||
// nested router
|
||||
if (_.has(route, 'routes')) {
|
||||
for (const key in api.routes) {
|
||||
const routerInfo = api.routes[key];
|
||||
for (const key in route.routes) {
|
||||
const routerInfo = route.routes[key];
|
||||
|
||||
const router = new Router({ prefix: routerInfo.prefix });
|
||||
|
||||
// TODO:: support router routes
|
||||
for (const route of routerInfo.routes || []) {
|
||||
composeEndpoint(route, { apiName, router });
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user