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

export const createSurvey = asyncWrap(async (req, res) => {
  const survey = req.body;
  console.log("Survey body", survey);
  const newSurvey = await surveyDb.createSurvey(survey);
  return res.json(newSurvey);
Lee SeoYeon's avatar
.    
Lee SeoYeon committed
9
});