Add a visual sparkle effect for new news updates on the Erling Haaland media outlet
Introduces a new API endpoint `/api/articles` and implements a client-side animation to visually alert users of new articles on the 'erling-haaland' outlet using CSS keyframes and conditional rendering. Replit-Commit-Author: Agent Replit-Commit-Session-Id: d9e77062-eeec-4c95-9131-905f69a78072 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/d9e77062-eeec-4c95-9131-905f69a78072/VftcvwB
This commit is contained in:
@ -69,6 +69,16 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
});
|
||||
|
||||
// Article routes
|
||||
app.get('/api/articles', async (req, res) => {
|
||||
try {
|
||||
const articles = await storage.getArticles();
|
||||
res.json(articles);
|
||||
} catch (error) {
|
||||
console.error("Error fetching articles:", error);
|
||||
res.status(500).json({ message: "Failed to fetch articles" });
|
||||
}
|
||||
});
|
||||
|
||||
app.get('/api/media-outlets/:slug/articles', async (req, res) => {
|
||||
try {
|
||||
const outlet = await storage.getMediaOutletBySlug(req.params.slug);
|
||||
|
||||
Reference in New Issue
Block a user