fix: add brackets
This commit is contained in:
@ -25,9 +25,9 @@ export function setupResourceRPC({ nuxt, rpc }: NuxtDevtoolsServerContext): any
|
|||||||
const routeTypes = {
|
const routeTypes = {
|
||||||
index: 'index.get.ts',
|
index: 'index.get.ts',
|
||||||
create: 'create.post.ts',
|
create: 'create.post.ts',
|
||||||
show: (by: string) => `${by}.get.ts`,
|
show: (by: string) => `[${by}].get.ts`,
|
||||||
put: (by: string) => `${by}.put.ts`,
|
put: (by: string) => `[${by}].put.ts`,
|
||||||
delete: (by: string) => `${by}.delete.ts`,
|
delete: (by: string) => `[${by}].delete.ts`,
|
||||||
}
|
}
|
||||||
resources.forEach((route: Resource) => {
|
resources.forEach((route: Resource) => {
|
||||||
const fileName = typeof routeTypes[route.type] === 'function'
|
const fileName = typeof routeTypes[route.type] === 'function'
|
||||||
|
|||||||
Reference in New Issue
Block a user