Upgrades prisma to latest version (#1894)

* Upgrades prisma

* Extends Stripe paid booking timeout

* Stripe test fixes

* Disables cache for db-reset

* Disabled cache from db-seed

* Avatar fixes

* Fixes paid booking test once and for all

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Omar Lópezandkodiakhq[bot] authored and GitHub committed 2022-02-18 15:16:53 -07:00
1 parent 81b4443fc2
commit deeafb21a5
5 files changed
+34 -35

No files matched your search

+3 -2
View File
@@ -8,6 +8,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
// const username = req.url?.substring(1, req.url.lastIndexOf("/"));
const username = req.query.username as string;
const user = await prisma.user.findUnique({
rejectOnNotFound: true,
where: {
username: username,
},
@@ -19,9 +20,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const emailMd5 = crypto
.createHash("md5")
.update(user?.email as string)
.update(user.email as string)
.digest("hex");
const img = user?.avatar;
const img = user.avatar;
if (!img) {
res.writeHead(302, {
Location: defaultAvatarSrc({ md5: emailMd5 }),