fix: add brackets

This commit is contained in:
arashsheyda
2023-04-27 00:05:13 +03:00
parent e0f56dfa38
commit f00819768e

View File

@ -25,9 +25,9 @@ export function setupResourceRPC({ nuxt, rpc }: NuxtDevtoolsServerContext): any
const routeTypes = {
index: 'index.get.ts',
create: 'create.post.ts',
show: (by: string) => `${by}.get.ts`,
put: (by: string) => `${by}.put.ts`,
delete: (by: string) => `${by}.delete.ts`,
show: (by: string) => `[${by}].get.ts`,
put: (by: string) => `[${by}].put.ts`,
delete: (by: string) => `[${by}].delete.ts`,
}
resources.forEach((route: Resource) => {
const fileName = typeof routeTypes[route.type] === 'function'