diff --git a/docusaurus/docs/cms/backend-customization/routes.md b/docusaurus/docs/cms/backend-customization/routes.md index ef5747a454..f5920ea584 100644 --- a/docusaurus/docs/cms/backend-customization/routes.md +++ b/docusaurus/docs/cms/backend-customization/routes.md @@ -97,7 +97,7 @@ module.exports = createCoreRouter('api::restaurant.restaurant', { -```js title="./src/api/[apiName]/routes/[routerName].ts (e.g './src/api/restaurant/routes/restaurant.ts')" +```ts title="./src/api/[apiName]/routes/[routerName].ts (e.g './src/api/restaurant/routes/restaurant.ts')" import { factories } from '@strapi/strapi'; @@ -149,7 +149,7 @@ module.exports = createCoreRouter('api::restaurant.restaurant', { -```js title="./src/api/restaurant/routes/restaurant.ts" +```ts title="./src/api/restaurant/routes/restaurant.ts" import { factories } from '@strapi/strapi'; @@ -168,7 +168,7 @@ export default factories.createCoreRouter('api::restaurant.restaurant', { -This only allows a `GET` request on the `/restaurants` path from the core `find` [controller](/cms/backend-customization/controllers) without authentication. +This only allows a `GET` request on the `/restaurants` path from the core `find` [controller](/cms/backend-customization/controllers) without authentication. When you reference custom controller actions in custom routers, prefer the fully‑qualified `api::..` form for clarity (e.g., `api::restaurant.restaurant.review`). ### Creating custom routers