1
0
mirror of https://github.com/robonen/metr.git synced 2026-03-20 02:44:42 +00:00
Files
metr/frontend/src/services/offer.js
Konstantin Vinokurov 9de12f2c3f Vue, back edited,added
2022-05-31 00:39:41 +07:00

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;