survey.api.ts 415 Bytes
Newer Older
Jiwon Yoon's avatar
Jiwon Yoon committed
1
2
3
4
5
6
7
8
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;
Lee SeoYeon's avatar
0711    
Lee SeoYeon committed
9
10
}

Lee SeoYeon's avatar
Lee SeoYeon committed
11
12
13
14
// export const getSurvey = async () => {
//     const {data} = await axios.get(`${baseUrl}/surveys/profile`)
//     return data;
// }