Skip to content

Commit b1c966f

Browse files
pwizlaweb-flow
andauthored
docs(backend): correct TypeScript code fences in TS tabs (controllers, services, middlewares, routes) (#2843)
Co-authored-by: GitHub Actions <[email protected]>
1 parent 237944c commit b1c966f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

docusaurus/docs/cms/backend-customization/controllers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ module.exports = createCoreController('api::restaurant.restaurant', ({ strapi })
9595

9696
<TabItem value="ts" label="TypeScript">
9797

98-
```js title="./src/api/restaurant/controllers/restaurant.ts"
98+
```ts title="./src/api/restaurant/controllers/restaurant.ts"
9999

100100
import { factories } from '@strapi/strapi';
101101

docusaurus/docs/cms/backend-customization/middlewares.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ module.exports = () => {
108108

109109
<TabItem value="ts" label="TypeScript">
110110

111-
```js title="/config/middlewares.ts"
111+
```ts title="/config/middlewares.ts"
112112

113113
export default () => {
114114
return async (ctx, next) => {

docusaurus/docs/cms/backend-customization/routes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ module.exports = createCoreRouter('api::restaurant.restaurant', {
9797

9898
<TabItem value="ts" label="TypeScript">
9999

100-
```js title="./src/api/[apiName]/routes/[routerName].ts (e.g './src/api/restaurant/routes/restaurant.ts')"
100+
```ts title="./src/api/[apiName]/routes/[routerName].ts (e.g './src/api/restaurant/routes/restaurant.ts')"
101101

102102
import { factories } from '@strapi/strapi';
103103

@@ -149,7 +149,7 @@ module.exports = createCoreRouter('api::restaurant.restaurant', {
149149

150150
<TabItem value="ts" label="TypeScript">
151151

152-
```js title="./src/api/restaurant/routes/restaurant.ts"
152+
```ts title="./src/api/restaurant/routes/restaurant.ts"
153153

154154
import { factories } from '@strapi/strapi';
155155

docusaurus/docs/cms/backend-customization/services.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ module.exports = createCoreService('api::restaurant.restaurant', ({ strapi }) =>
8383

8484
<TabItem value="ts" label="TypeScript">
8585

86-
```js title="./src/api/restaurant/services/restaurant.ts"
86+
```ts title="./src/api/restaurant/services/restaurant.ts"
8787

8888
import { factories } from '@strapi/strapi';
8989

@@ -171,7 +171,7 @@ module.exports = createCoreService('api::restaurant.restaurant', ({ strapi }) =>
171171

172172
<TabItem value="ts" label="TypeScript">
173173

174-
```js title="./src/api/restaurant/services/restaurant.ts"
174+
```ts title="./src/api/restaurant/services/restaurant.ts"
175175

176176

177177
import { factories } from '@strapi/strapi';

0 commit comments

Comments
 (0)