ваше сообщение коммита
This commit is contained in:
24
frontend/src/services/pagesService.js
Normal file
24
frontend/src/services/pagesService.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import api from '../api/axios';
|
||||
|
||||
export default {
|
||||
async getPages() {
|
||||
const res = await api.get('/pages');
|
||||
return res.data;
|
||||
},
|
||||
async createPage(data) {
|
||||
const res = await api.post('/pages', data);
|
||||
return res.data;
|
||||
},
|
||||
async getPage(id) {
|
||||
const res = await api.get(`/pages/${id}`);
|
||||
return res.data;
|
||||
},
|
||||
async updatePage(id, data) {
|
||||
const res = await api.patch(`/pages/${id}`, data);
|
||||
return res.data;
|
||||
},
|
||||
async deletePage(id) {
|
||||
const res = await api.delete(`/pages/${id}`);
|
||||
return res.data;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user