add
This commit is contained in:
7
frontend/src/api/order.js
Normal file
7
frontend/src/api/order.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import http from './http';
|
||||
|
||||
export const createOrder = (data) => http.post('/orders', data);
|
||||
export const listOrders = () => http.get('/orders');
|
||||
export const getOrder = (id) => http.get(`/orders/${id}`);
|
||||
export const payOrder = (id) => http.post(`/orders/${id}/pay`);
|
||||
export const cancelOrder = (id) => http.put(`/orders/${id}/cancel`);
|
||||
Reference in New Issue
Block a user