Refactor favorites management to use Redis
- Removed local favorites.json file and related file handling in the code. - Implemented Redis caching for managing favorite articles, including methods to set, get, and check favorites. - Updated TelegramManager and server API to interact with Redis for favorite operations. - Added search functionality for articles in Redis, enhancing user experience. - Adjusted frontend components to support searching and displaying articles from Redis.
This commit is contained in:
@@ -49,6 +49,13 @@ export default {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
async searchArticles(query) {
|
||||
const response = await api.get('/articles/search', {
|
||||
params: { q: query },
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Logs
|
||||
async getLogs(limit = 100) {
|
||||
const response = await api.get('/logs', {
|
||||
|
||||
Reference in New Issue
Block a user