cinema.api.js 383 Bytes
Newer Older
Kim, Subin's avatar
Kim, Subin committed
1
import axios from "axios";
Jiwon Yoon's avatar
Jiwon Yoon committed
2
import {baseUrl} from "../utils/baseUrl.js";
Kim, Subin's avatar
Kim, Subin committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

const getInfo = async () => {
    const { data } = await axios.get(`${baseUrl}/api/cinema`)
    return data
}

const edit = async (cinemaInfo) => {
    const { data } = await axios.put(`${baseUrl}/api/cinema`, cinemaInfo)
    return data
}

const cinemaApi = {
    getInfo,
    edit
}

export default cinemaApi