mongodb
Signed-off-by: Omar Sánchez Pizarro <omar.sanchez@pistacero.net>
This commit is contained in:
@@ -74,10 +74,9 @@ export default {
|
||||
},
|
||||
|
||||
// Artículos
|
||||
async getArticles(limit = 100, offset = 0) {
|
||||
const response = await api.get('/articles', {
|
||||
params: { limit, offset },
|
||||
});
|
||||
async getArticles(limit = 100, offset = 0, additionalParams = {}) {
|
||||
const params = { limit, offset, ...additionalParams };
|
||||
const response = await api.get('/articles', { params });
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -105,6 +104,16 @@ export default {
|
||||
},
|
||||
|
||||
// Telegram
|
||||
async getTelegramConfig() {
|
||||
const response = await api.get('/telegram/config');
|
||||
return response.data;
|
||||
},
|
||||
|
||||
async setTelegramConfig(config) {
|
||||
const response = await api.put('/telegram/config', config);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
async getTelegramThreads() {
|
||||
const response = await api.get('/telegram/threads');
|
||||
return response.data;
|
||||
@@ -116,6 +125,12 @@ export default {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Artículos - Borrar todos (solo admin)
|
||||
async clearAllArticles() {
|
||||
const response = await api.delete('/articles');
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Usuarios
|
||||
async getUsers() {
|
||||
const response = await api.get('/users');
|
||||
|
||||
Reference in New Issue
Block a user