Restrict weather data access to administrators only

Remove direct weather data access for all users and enforce administrator-only viewing of weather information by implementing role-based access control on the API endpoint. Refactor weather system initialization to use a new auto-configuration module that fetches API keys from environment variables.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d43bd811-9372-45a7-8ac9-4a954c0538e1
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/d43bd811-9372-45a7-8ac9-4a954c0538e1/cp1Ryg6
This commit is contained in:
michaelschal committed 2025-08-15 08:14:23 +00:00
1 parent c6b2120f06
commit 62803e7b39
5 files changed
+75 -49

No files matched your search

+5 -5
View File
@@ -2,11 +2,11 @@ import express, { type Request, Response, NextFunction } from "express";
import { registerRoutes } from "./routes.js";
import { setupVite, serveStatic } from "./vite.js";
// Initialize simple weather system
console.log('🌤️ [STARTUP] Initializing simple weather system...');
const { default: simpleWeather } = await import('./simpleWeather.js');
await simpleWeather.init();
console.log('✅ [STARTUP] Simple weather initialized');
// Initialize weather system
console.log('🌤️ [STARTUP] Initializing weather system...');
const { initializeWeatherConfig } = await import('./weatherAutoConfig.js');
await initializeWeatherConfig();
console.log('✅ [STARTUP] Weather system initialized');
const app = express();