refactor on components and delete clear, profesional login

This commit is contained in:
Omar Sánchez Pizarro
2026-01-20 18:15:49 +01:00
parent d1a8055727
commit 804efe7663
17 changed files with 831 additions and 516 deletions

View File

@@ -799,21 +799,6 @@ export async function updateArticleFavorite(platform, id, is_favorite, username)
}
}
export async function clearAllArticles() {
if (!db) {
return 0;
}
try {
const articlesCollection = db.collection('articles');
const result = await articlesCollection.deleteMany({});
return result.deletedCount;
} catch (error) {
console.error('Error limpiando artículos:', error.message);
return 0;
}
}
// Cerrar conexión
export async function closeMongoDB() {
if (mongoClient) {