room.api.js 455 Bytes
Newer Older
1
2
import axios from "axios";

이재연's avatar
이재연 committed
3
4
const getRoom = async (payload) => {
  const { data } = await axios.post(`/api/room/getRoom`,payload);
우지원's avatar
e    
우지원 committed
5
6
7
  return data;
};

우지원's avatar
e    
우지원 committed
8
9
const create = async (payload) => {
  const { data } = await axios.post("/api/room/create", payload);
10
11
12
  return data;
};

우지원's avatar
e    
우지원 committed
13
14
const join = async (payload) => {
  const { data } = await axios.put("/api/room/join", payload);
15
16
17
  return data;
};

우지원's avatar
e    
우지원 committed
18
const roomApi = { getRoom, create, join };
19
20

export default roomApi;