mirror of
https://github.com/robonen/metr.git
synced 2026-03-20 02:44:42 +00:00
23 lines
531 B
JavaScript
23 lines
531 B
JavaScript
import api from "@/services/api";
|
|
|
|
export const OfferService = {
|
|
async add(data) {
|
|
const resp = await api.post('/offers', data);
|
|
return resp;
|
|
},
|
|
async update(id, data) {
|
|
const resp = await api.put(`/offers/${id}`, data);
|
|
return resp;
|
|
},
|
|
async allUserOffers() {
|
|
const resp = await api.get('/users/offers');
|
|
return resp;
|
|
},
|
|
async getById(id) {
|
|
const resp = await api.get(`/offers/${id}`);
|
|
return resp;
|
|
}
|
|
};
|
|
|
|
export default OfferService;
|