Skip to content

Commit f16f32f

Browse files
lcpichettepwizla
andauthored
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 <[email protected]>
1 parent b92abfd commit f16f32f

File tree

1 file changed

+7
-7
lines changed
  • docusaurus/docs/dev-docs/backend-customization

1 file changed

+7
-7
lines changed

Diff for: docusaurus/docs/dev-docs/backend-customization/routes.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Requests sent to Strapi on any URL are handled by routes. By default, Strapi gen
1515
- with [policies](#policies), which are a way to block access to a route,
1616
- and with [middlewares](#middlewares), which are a way to control and change the request flow and the request itself.
1717

18-
Once a route exists, reaching it executes some code handled by a controller (see [controllers documentation](/dev-docs/backend-customization/controllers)).
18+
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)).
1919

2020
<figure style={imgStyle}>
2121
<img src="/img/assets/backend-customization/diagram-routes.png" alt="Simplified Strapi backend diagram with routes highlighted" />
@@ -319,7 +319,7 @@ module.exports = {
319319
{
320320
method: 'GET',
321321
path: '/articles/customRoute',
322-
handler: 'controllerName.actionName',
322+
handler: 'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller
323323
config: {
324324
policies: [
325325
// point to a registered policy
@@ -350,7 +350,7 @@ export default {
350350
{
351351
method: 'GET',
352352
path: '/articles/customRoute',
353-
handler: 'controllerName.actionName',
353+
handler: 'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller
354354
config: {
355355
policies: [
356356
// point to a registered policy
@@ -462,7 +462,7 @@ module.exports = {
462462
{
463463
method: 'GET',
464464
path: '/articles/customRoute',
465-
handler: 'controllerName.actionName',
465+
handler: 'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller
466466
config: {
467467
middlewares: [
468468
// point to a registered middleware
@@ -493,7 +493,7 @@ export default {
493493
{
494494
method: 'GET',
495495
path: '/articles/customRoute',
496-
handler: 'controllerName.actionName',
496+
handler: 'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller
497497
config: {
498498
middlewares: [
499499
// point to a registered middleware
@@ -582,7 +582,7 @@ module.exports = {
582582
{
583583
method: 'GET',
584584
path: '/articles/customRoute',
585-
handler: 'controllerName.actionName',
585+
handler: 'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller
586586
config: {
587587
auth: false,
588588
},
@@ -602,7 +602,7 @@ export default {
602602
{
603603
method: 'GET',
604604
path: '/articles/customRoute',
605-
handler: 'controllerName.actionName',
605+
handler: 'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller
606606
config: {
607607
auth: false,
608608
},

0 commit comments

Comments
 (0)