From 675ff18c084e5107d64b13e791ea96e5de7c9dc3 Mon Sep 17 00:00:00 2001 From: ExostFlash Date: Tue, 1 Apr 2025 18:05:35 +0200 Subject: [PATCH] Change api url and add meta --- src/app/service/all/news/news.service.ts | 6 +++-- src/index.html | 34 +++++++++++++++++++++++- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/app/service/all/news/news.service.ts b/src/app/service/all/news/news.service.ts index a666e80..8035394 100644 --- a/src/app/service/all/news/news.service.ts +++ b/src/app/service/all/news/news.service.ts @@ -8,8 +8,10 @@ import { tap } from 'rxjs/operators'; providedIn: 'root' }) export class NewsService { - private apiKey: string = 'e9bb2770d3374edea421bcadbecdca5c'; - private apiUrl: string = `https://newsapi.org/v2/everything?q=covid&language=fr&apiKey=${this.apiKey}`; + /* private apiKey: string = 'e9bb2770d3374edea421bcadbecdca5c'; + private apiUrl: string = `https://newsapi.org/v2/everything?q=covid&language=fr&apiKey=${this.apiKey}`; */ + + private apiUrl: string = `https://gitpushf.uk/news-proxy.php`; private storageKey: string = 'newsData'; // Clé utilisée pour le localStorage private lastUpdateKey: string = 'lastUpdate'; // Clé pour stocker la date de la dernière mise à jour private cacheDuration: number = 60 * 60 * 1000; // Durée en millisecondes (par exemple, 1 heure) diff --git a/src/index.html b/src/index.html index d67d74a..424daf6 100644 --- a/src/index.html +++ b/src/index.html @@ -2,10 +2,42 @@ - Angular Covid + + + + + + + + + + + + + Angular Covid + + + + + + + + + + + + + + + + + + + +