mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-24 15:48:16 +02:00
Fix: Augmentation limites frontend articles RSS
- Augmente limite dans Index.tsx de 14 à 100 articles - Augmente limite par défaut dans RssService.ts de 20 à 50 articles - Permet l'affichage de tous les nouveaux articles récupérés Complète le fix précédent qui augmentait les limites backend. Le problème était que le backend récupérait 27+ nouveaux articles mais le frontend n'en demandait que 14, affichant toujours les mêmes.
This commit is contained in:
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -183,7 +183,7 @@ const Index = () => {
|
|||||||
|
|
||||||
const loadRssArticles = async () => {
|
const loadRssArticles = async () => {
|
||||||
try {
|
try {
|
||||||
const articles = await RssService.getArticles(14);
|
const articles = await RssService.getArticles(100);
|
||||||
if (Array.isArray(articles)) {
|
if (Array.isArray(articles)) {
|
||||||
setRssArticles(articles);
|
setRssArticles(articles);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class RssService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getArticles(limit: number = 20): Promise<RssArticle[]> {
|
async getArticles(limit: number = 50): Promise<RssArticle[]> {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(`${this.baseURL}/articles?limit=${limit}`, this.getAuthHeader());
|
const response = await axios.get(`${this.baseURL}/articles?limit=${limit}`, this.getAuthHeader());
|
||||||
return response.data;
|
return response.data;
|
||||||
|
|||||||
Reference in new issue
Block a user