survey.api.ts 403 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
11
12
13
}

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