Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update api #113

Merged
merged 5 commits into from
Mar 7, 2023
Merged

Update api #113

merged 5 commits into from
Mar 7, 2023

Conversation

ThoJah
Copy link
Collaborator

@ThoJah ThoJah commented Mar 3, 2023

No description provided.

@ThoJah ThoJah requested review from dnmct and NoHara42 March 3, 2023 11:16
@ThoJah ThoJah linked an issue Mar 3, 2023 that may be closed by this pull request
3 tasks
@ThoJah
Copy link
Collaborator Author

ThoJah commented Mar 3, 2023

This pull request updates the seeLists.ts from main to the new schema.
The other API files got their adjustment in open pull requests that involved other changes on these files.

@NoHara42
Copy link
Collaborator

NoHara42 commented Mar 3, 2023

@ThoJah please finish PRs before asking instructors to merge, are you finished? If so turn this draft PR to a PR

@peelerzin peelerzin marked this pull request as ready for review March 6, 2023 10:26
@ThoJah ThoJah marked this pull request as draft March 6, 2023 15:57
@ThoJah
Copy link
Collaborator Author

ThoJah commented Mar 6, 2023

Includes the toplevel initialization of prisma

@ThoJah ThoJah marked this pull request as ready for review March 6, 2023 15:59
@@ -0,0 +1,11 @@
import { PrismaClient } from "@prisma/client";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change file to .ts as there is no html in this file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applied

@@ -1,6 +1,6 @@
import { NextApiRequest, NextApiResponse } from "next";
import { z, ZodError } from "zod";
import { Items, List, Prisma, PrismaClient } from "@prisma/client";
import { PrismaClient } from "@prisma/client";

const prisma = new PrismaClient();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to import the exported prisma client in the prisma.ts file, and not instantiate a new prisma client here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applied

Copy link
Collaborator

@NoHara42 NoHara42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see changes

@ThoJah ThoJah requested a review from NoHara42 March 7, 2023 13:16
@NoHara42 NoHara42 removed the request for review from dnmct March 7, 2023 13:49
Copy link
Collaborator

@NoHara42 NoHara42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NoHara42 NoHara42 merged commit d1d6b3d into main Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating addItem.ts, deleteItem.ts, seeLists.ts to the new prisma schema
3 participants