feat: новая функция
This commit is contained in:
@@ -18,8 +18,9 @@ export default {
|
||||
const res = await api.get('/pages');
|
||||
return res.data;
|
||||
},
|
||||
async createPage(data) {
|
||||
const res = await api.post('/pages', data);
|
||||
async createPage(data, isFormData = false) {
|
||||
const config = isFormData ? { headers: { 'Content-Type': 'multipart/form-data' } } : undefined;
|
||||
const res = await api.post('/pages', data, config);
|
||||
return res.data;
|
||||
},
|
||||
async getPage(id) {
|
||||
@@ -40,6 +41,10 @@ export default {
|
||||
const res = await api.get('/pages/public/all');
|
||||
return res.data;
|
||||
},
|
||||
async getInternalPages() {
|
||||
const res = await api.get('/pages/internal/all');
|
||||
return res.data;
|
||||
},
|
||||
async getPublicPage(id) {
|
||||
const res = await api.get(`/pages/public/${id}`);
|
||||
return res.data;
|
||||
|
||||
Reference in New Issue
Block a user