Skip to content

Commit 5a2fb62

Browse files
committed
feat: add back the example route to the content-api routes
1 parent 0354cdb commit 5a2fb62

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

src/cli/commands/plugin/init/files/server.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,17 @@ const TYPESCRIPT = (pluginName: string): TemplateFile[] => [
134134
contents: outdent`
135135
export default () => ({
136136
type: 'content-api',
137-
routes: [],
137+
routes: [
138+
{
139+
method: 'GET',
140+
path: '/',
141+
// name of the controller file & the method.
142+
handler: 'controller.index',
143+
config: {
144+
policies: [],
145+
},
146+
},
147+
],
138148
});
139149
`,
140150
},
@@ -312,7 +322,17 @@ const JAVASCRIPT = (pluginName: string): TemplateFile[] => [
312322
contents: outdent`
313323
export default () => ({
314324
type: 'content-api',
315-
routes: [],
325+
routes: [
326+
{
327+
method: 'GET',
328+
path: '/',
329+
// name of the controller file & the method.
330+
handler: 'controller.index',
331+
config: {
332+
policies: [],
333+
},
334+
},
335+
],
316336
});
317337
`,
318338
},

0 commit comments

Comments
 (0)