core-nails 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,7 +35,8 @@ export default ${modelName};
35
35
  const schemaFilePath = path.join(dbDir, "schema.ts");
36
36
  const schemaBaseContent = `import FirebaseAdmin from "@lib/FirebaseAdmin";
37
37
  import Nails from "core-nails";
38
- import { z } from "zod";`;
38
+ import { z } from "zod";
39
+ `;
39
40
  // Ensure schema file exists
40
41
  if (!fs.existsSync(schemaFilePath)) {
41
42
  fs.writeFileSync(schemaFilePath, schemaBaseContent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-nails",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -113,19 +113,19 @@ export async function POST(req: Request) {
113
113
  const apiIdRouteContent = `import ${camelName}Controller from "@controller/${camelName}";
114
114
 
115
115
  export async function GET(req: Request, { params }: { params: { id: string } }) {
116
- return ${camelName}Controller.show_action(req, params.id);
116
+ return ${camelName}Controller.show_action(req, (await params).id);
117
117
  }
118
118
 
119
119
  export async function PATCH(req: Request, { params }: { params: { id: string } }) {
120
- return ${camelName}Controller.update_action(req, params.id);
120
+ return ${camelName}Controller.update_action(req, (await params).id);
121
121
  }
122
122
 
123
123
  export async function PUT(req: Request, { params }: { params: { id: string } }) {
124
- return ${camelName}Controller.update_action(req, params.id);
124
+ return ${camelName}Controller.update_action(req, (await params).id);
125
125
  }
126
126
 
127
127
  export async function DELETE(req: Request, { params }: { params: { id: string } }) {
128
- return ${camelName}Controller.destroy_action(req, params.id);
128
+ return ${camelName}Controller.destroy_action(req, (await params).id);
129
129
  }
130
130
  `;
131
131