mainimg.api.ts 512 Bytes
Newer Older
백승민's avatar
백승민 committed
1
2
3
4
5
6
7
8
9
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;
};

백승민's avatar
백승민 committed
10
export const delmainimg = async (_id : string) => {
백승민's avatar
백승민 committed
11
    const { data } = await axios.delete(`${baseUrl}/mainimg/${_id}`);
백승민's avatar
백승민 committed
12
13
14
15
16
17
18
    return data;
};

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