Skip to content

Commit

Permalink
pr: chore - Improving routes page (#2097)
Browse files Browse the repository at this point in the history
* 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 <pwizla@users.noreply.github.com>
  • Loading branch information
lcpichette and pwizla committed May 2, 2024
1 parent b92abfd commit f16f32f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docusaurus/docs/dev-docs/backend-customization/routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).

<figure style={imgStyle}>
<img src="/img/assets/backend-customization/diagram-routes.png" alt="Simplified Strapi backend diagram with routes highlighted" />
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
},
Expand All @@ -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,
},
Expand Down

0 comments on commit f16f32f

Please sign in to comment.