Commit 6493078a authored by Kim, Subin's avatar Kim, Subin
Browse files

cinemaApi - 영화관람표 관련 내용 추가

parent 619844f9
import axios from "axios"; import axios from "axios";
import {baseUrl} from "../utils/baseUrl.js"; import { baseUrl } from "../utils/baseUrl.js";
const getInfo = async () => { const getCinemaInfo = async () => {
const { data } = await axios.get(`${baseUrl}/api/cinema`) const { data } = await axios.get(`${baseUrl}/api/info/cinema`)
return data return data
} }
const edit = async (cinemaInfo) => { const editCinema = async (cinemaInfo) => {
const { data } = await axios.put(`${baseUrl}/api/cinema`, cinemaInfo) const { data } = await axios.put(`${baseUrl}/api/info/cinema`, cinemaInfo)
return data
}
const getTicketFee = async () => {
const { data } = await axios.get(`${baseUrl}/api/info/ticketfee`)
return data
}
const getTicketFeeOne = async (theaterType) => {
const { data } = await axios.get(`${baseUrl}/api/info/ticketfee/${theaterType}`)
return data
}
const editTicketFee = async (ticketFeeInfo) => {
const { data } = await axios.put(`${baseUrl}/api/info/ticketfee`, ticketFeeInfo)
return data
}
const removeTicketFee = async (theaterType) => {
const { data } = await axios.delete(`${baseUrl}/api/info/ticketfee?theaterType=${theaterType}`)
return data return data
} }
const cinemaApi = { const cinemaApi = {
getInfo, getCinemaInfo,
edit editCinema,
getTicketFee,
getTicketFeeOne,
editTicketFee,
removeTicketFee
} }
export default cinemaApi export default cinemaApi
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment