Skip to content

Commit

Permalink
Merge pull request #2 from ARC-Solutions/feat/ITP-50
Browse files Browse the repository at this point in the history
ITP-50 implement /api/quiz/js
  • Loading branch information
RickyRAV authored Oct 15, 2023
2 parents f2285e4 + 2c2c29c commit 170e45f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,17 @@ app.get('/api/quiz/anime', async (req, res) => {
res.json({ questions });
});

app.get('/api/quiz/js', async (req, res) => {
const questions = await generateQuizQuestions('javascript', 4);
res.json({ questions });
});


app.get('/api/quiz/gaming', async (req, res) => {
const questions = await generateQuizQuestions('gaming', 4);
res.json({ questions });
});


const startServer = async () => {
const port = process.env.PORT || 3000;
app.listen(port, () => {
Expand Down

0 comments on commit 170e45f

Please sign in to comment.