-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nevo David
committed
Oct 20, 2023
1 parent
3c3a8db
commit d9c2054
Showing
3 changed files
with
30 additions
and
49 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
39 changes: 10 additions & 29 deletions
39
src/components/shared/product-hunt/product-hunt.button.jsx
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,23 +1,23 @@ | ||
import findUserAndTeam from '~/helpers/find.user.and.team'; | ||
import prisma from '~/prisma/client'; | ||
// import findUserAndTeam from '~/helpers/find.user.and.team'; | ||
// import prisma from '~/prisma/client'; | ||
|
||
export default async function handler(req, res) { | ||
const { user } = await findUserAndTeam(req, res); | ||
if ( | ||
!user || | ||
process.env.RIDDLE_ANSWER.split(',') | ||
.map((p) => p.toLowerCase()) | ||
.includes(req.body.answer.toLowerCase()) === false | ||
) { | ||
res.json({ finish: false }); | ||
return; | ||
} | ||
|
||
await prisma.productHunt.create({ | ||
data: { | ||
userId: user.id, | ||
}, | ||
}); | ||
// const { user } = await findUserAndTeam(req, res); | ||
// if ( | ||
// !user || | ||
// process.env.RIDDLE_ANSWER.split(',') | ||
// .map((p) => p.toLowerCase()) | ||
// .includes(req.body.answer.toLowerCase()) === false | ||
// ) { | ||
// res.json({ finish: false }); | ||
// return; | ||
// } | ||
// | ||
// await prisma.productHunt.create({ | ||
// data: { | ||
// userId: user.id, | ||
// }, | ||
// }); | ||
|
||
res.json({ finish: true }); | ||
} |
d9c2054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
hacksquad-website – ./
hacksquad-website-novuhq.vercel.app
hacksquad-website.vercel.app
hacksquad-website-git-new-hacksquad-novuhq.vercel.app
www.hacksquad.dev