Skip to content

Commit

Permalink
Disabled typing because of this bug: prisma/prisma#10404
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolai-cc committed Jan 6, 2022
1 parent 8942746 commit 3b63465
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules
.env
.env.*
!.env.example
.vercel_build_output
8 changes: 6 additions & 2 deletions src/routes/api/categories/index.json.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { prisma } from "$lib/prisma";
import type { Category } from "@prisma/client";
// import type { Category } from "@prisma/client";

/*
Typing disabled because of this bug: https://github.com/prisma/prisma/issues/10404
*/

// GET /categories.json
export const get = async ({}) => {
Expand All @@ -8,7 +12,7 @@ export const get = async ({}) => {
};

// POST /categories.json
export const post = async ({ body: data }: { body: Category }) => {
export const post = async ({ body: data }: { body: any }) => {
const body = await prisma.category.create({ data });
return { body }
}
8 changes: 6 additions & 2 deletions src/routes/api/features/index.json.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { prisma } from "$lib/prisma";
import type { Feature } from "@prisma/client";
// import type { Feature } from "@prisma/client";

/*
Typing disabled because of this bug: https://github.com/prisma/prisma/issues/10404
*/

// GET /features.json
export const get = async ({}) => {
Expand All @@ -8,7 +12,7 @@ export const get = async ({}) => {
};

// POST /features.json
export const post = async ({ body: data }: { body: Feature }) => {
export const post = async ({ body: data }: { body: any }) => {
const body = await prisma.feature.create({ data });
return { body }
}
8 changes: 6 additions & 2 deletions src/routes/api/product_features/index.json.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { prisma } from "$lib/prisma";
import type { ProductFeature } from "@prisma/client";
// import type { ProductFeature } from "@prisma/client";

/*
Typing disabled because of this bug: https://github.com/prisma/prisma/issues/10404
*/

// GET /product_features.json
export const get = async ({}) => {
Expand All @@ -8,7 +12,7 @@ export const get = async ({}) => {
};

// POST /product_features.json
export const post = async ({ body: data }: { body: ProductFeature }) => {
export const post = async ({ body: data }: { body: any }) => {
const body = await prisma.productFeature.create({ data });
return { body }
}
8 changes: 6 additions & 2 deletions src/routes/api/products/index.json.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { prisma } from "$lib/prisma";
import type { Product } from "@prisma/client";
// import type { Product } from "@prisma/client";

/*
Typing disabled because of this bug: https://github.com/prisma/prisma/issues/10404
*/

// GET /products.json
export const get = async ({}) => {
Expand All @@ -8,7 +12,7 @@ export const get = async ({}) => {
};

// POST /products.json
export const post = async ({ body: data }: { body: Product }) => {
export const post = async ({ body: data }: { body: any }) => {
const body = await prisma.product.create({ data });
return { body }
}

0 comments on commit 3b63465

Please sign in to comment.