-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from TEDx-SJEC/razorpay
Razorpay
- Loading branch information
Showing
29 changed files
with
1,058 additions
and
592 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- DropIndex | ||
DROP INDEX "Form_usn_key"; | ||
|
||
-- CreateTable | ||
CREATE TABLE "Payment" ( | ||
"signature" TEXT, | ||
"form_id" TEXT NOT NULL, | ||
"amount" REAL NOT NULL, | ||
"order_creation_id" TEXT NOT NULL, | ||
"razorpay_payment_id" TEXT NOT NULL PRIMARY KEY, | ||
"created_at" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" DATETIME NOT NULL, | ||
"formId" TEXT, | ||
CONSTRAINT "Payment_form_id_fkey" FOREIGN KEY ("form_id") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE, | ||
CONSTRAINT "Payment_formId_fkey" FOREIGN KEY ("formId") REFERENCES "Form" ("id") ON DELETE SET NULL ON UPDATE CASCADE | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import prisma from "@/server/db"; // Adjust the import based on your structure | ||
|
||
export async function getUserById(userId: string) { | ||
const user = await prisma.user.findUnique({ | ||
where: { id: userId }, | ||
select: { | ||
id: true, | ||
role: true, // Include any other fields you need | ||
}, | ||
}); | ||
const user = await prisma.user.findUnique({ | ||
where: { id: userId }, | ||
select: { | ||
id: true, | ||
role: true, // Include any other fields you need | ||
}, | ||
}); | ||
|
||
return user; | ||
return user; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.