2024-01-19 18:32:01 +04:00

15 lines
335 B
JavaScript

import $axios from "../axios";
class OrderService {
getAll = async (userId) => {
const response = await $axios.get(`/orders?userId=${userId}`);
return response.data;
}
create = async (data) => {
const response = await $axios.post("/orders", data);
return response.data;
}
}
export default new OrderService();