question.controller.ts 318 Bytes
Newer Older
Jiwon Yoon's avatar
Jiwon Yoon committed
1
2
3
4
5
6
7
8
9
import { questionDb } from "../db";
import { asyncWrap } from "../helpers/asyncWrap";

export const createQuestion = asyncWrap(async (req, res) => {
  const question = req.body;
  console.log("question body", question);
  const newQuestion = await questionDb.createQuestion(question);
  return res.json(question);
});