Add lots of things
This commit is contained in:
8
drill-and-practice/services/questionService.js
Normal file
8
drill-and-practice/services/questionService.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import { sql } from "../database/database.js";
|
||||
|
||||
const countQuestions = async () => {
|
||||
const result = await sql`SELECT COUNT(id) FROM questions`;
|
||||
return result.rows[0].count;
|
||||
};
|
||||
|
||||
const getQuestionsByTopicId = async (topicId) => {
|
||||
Reference in New Issue
Block a user