mainimg.api.ts 533 Bytes
Newer Older
백승민's avatar
백승민 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import axios from "axios";
import { MainimgType } from "../types";
import baseUrl from "./baseUrl";

export const mainimg = async (mainimg: MainimgType) => {
    const { data } = await axios.post(`${baseUrl}/mainimg`, mainimg);
    return data;
};

export const delmainimg = async (id : string) => {
    const { data } = await axios.delete(`${baseUrl}/mainimg`);
    return data;
};

export const getmainimg = async () => {
    const { data } = await axios.get(`${baseUrl}/mainimg`);
    console.log("test",data)
    return data;
};