import axios from "axios";

const API_URL = "http://192.168.1.59:3000/users";

export const getAllUsers = () => axios.get(API_URL);

export const getUserByPhone = (phoneNumber) =>
  axios.get(`${API_URL}?phoneNumber=${phoneNumber}`);

export const updateUserReservedSeats = (userId, reservedSeats) =>
  axios.patch(`${API_URL}/${userId}`, { reservedSeats });

export const postUser=async(userData)=>{
  return await axios.post(API_URL,userData);
}