survey.api.ts 279 Bytes
Newer Older
Jiwon Yoon's avatar
Jiwon Yoon committed
1
2
3
4
5
6
7
8
9
import axios from "axios";
import { SurveyType } from "../types";
import baseUrl from "./baseUrl";

export const createSurvey = async (survey:SurveyType) => {
    console.log(survey)
    const {data} = await axios.post(`${baseUrl}/surveys/create`, {...survey})
    return data;
}