From f16f32f94a8cf457a56f33e433320cd808f5ae37 Mon Sep 17 00:00:00 2001 From: Lucas Pichette <54318714+lcpichette@users.noreply.github.com> Date: Thu, 2 May 2024 01:50:56 -0700 Subject: [PATCH] pr: chore - Improving routes page (#2097) * Update routes.md * Fixes typo in command * Updates other controllerName.actionName -> api::apiName.controllerName.functionName * Update docusaurus/docs/dev-docs/backend-customization/routes.md * Update docusaurus/docs/dev-docs/backend-customization/routes.md * Update docusaurus/docs/dev-docs/backend-customization/routes.md * Update docusaurus/docs/dev-docs/backend-customization/routes.md * Update docusaurus/docs/dev-docs/backend-customization/routes.md * Update docusaurus/docs/dev-docs/backend-customization/routes.md * Update docusaurus/docs/dev-docs/backend-customization/routes.md * Update docusaurus/docs/dev-docs/backend-customization/routes.md * Update docusaurus/docs/dev-docs/backend-customization/routes.md * Update docusaurus/docs/dev-docs/backend-customization/routes.md * Update docusaurus/docs/dev-docs/backend-customization/routes.md * Update docusaurus/docs/dev-docs/backend-customization/routes.md * Update docusaurus/docs/dev-docs/backend-customization/routes.md --------- Co-authored-by: Pierre Wizla --- .../docs/dev-docs/backend-customization/routes.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docusaurus/docs/dev-docs/backend-customization/routes.md b/docusaurus/docs/dev-docs/backend-customization/routes.md index ba660be4d2..c8567b420b 100644 --- a/docusaurus/docs/dev-docs/backend-customization/routes.md +++ b/docusaurus/docs/dev-docs/backend-customization/routes.md @@ -15,7 +15,7 @@ Requests sent to Strapi on any URL are handled by routes. By default, Strapi gen - with [policies](#policies), which are a way to block access to a route, - and with [middlewares](#middlewares), which are a way to control and change the request flow and the request itself. -Once a route exists, reaching it executes some code handled by a controller (see [controllers documentation](/dev-docs/backend-customization/controllers)). +Once a route exists, reaching it executes some code handled by a controller (see [controllers documentation](/dev-docs/backend-customization/controllers)). To view all existing routes and their hierarchal order, you can run `yarn strapi routes:list` (see [CLI reference](/dev-docs/cli)).
Simplified Strapi backend diagram with routes highlighted @@ -319,7 +319,7 @@ module.exports = { { method: 'GET', path: '/articles/customRoute', - handler: 'controllerName.actionName', + handler: 'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller config: { policies: [ // point to a registered policy @@ -350,7 +350,7 @@ export default { { method: 'GET', path: '/articles/customRoute', - handler: 'controllerName.actionName', + handler: 'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller config: { policies: [ // point to a registered policy @@ -462,7 +462,7 @@ module.exports = { { method: 'GET', path: '/articles/customRoute', - handler: 'controllerName.actionName', + handler: 'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller config: { middlewares: [ // point to a registered middleware @@ -493,7 +493,7 @@ export default { { method: 'GET', path: '/articles/customRoute', - handler: 'controllerName.actionName', + handler: 'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller config: { middlewares: [ // point to a registered middleware @@ -582,7 +582,7 @@ module.exports = { { method: 'GET', path: '/articles/customRoute', - handler: 'controllerName.actionName', + handler: 'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller config: { auth: false, }, @@ -602,7 +602,7 @@ export default { { method: 'GET', path: '/articles/customRoute', - handler: 'controllerName.actionName', + handler: 'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller config: { auth: false, },