survey.db.ts 308 Bytes
Newer Older
Jiwon Yoon's avatar
Jiwon Yoon committed
1
2
3
4
5
6
import { Survey, ISurvey } from "../models";

export const createSurvey = async (survey: ISurvey) => {
  const newSurvey = await Survey.create(survey);
  return newSurvey;
};
Lee SeoYeon's avatar
0711    
Lee SeoYeon committed
7

Lee SeoYeon's avatar
Lee SeoYeon committed
8
9
10
11
// export const getSurveys = async () => {
//   const surveys = await Survey.find({}).populate("questions")
//   return surveys
// }