feat: Add banner management feature and improve event/gallery image handling
- Introduced a new "Banners" feature, enabling banner creation, management, and display across the admin panel and frontend. - Enhanced image handling for events and gallery by converting images to optimized webp format. - Added `banners` table in the database schema for storing announcements. - Integrated new `/api/banners` route in backend for banner operations. - Updated `index.astro` to include banner display component. - Added supporting UI and APIs in the admin panel for banner management.
This commit is contained in:
@ -16,6 +16,7 @@ import galleryRoute from './routes/gallery.js';
|
||||
import contentRoute from './routes/content.js';
|
||||
import settingsRoute from './routes/settings.js';
|
||||
import publishRoute from './routes/publish.js';
|
||||
import bannersRoute from './routes/banners.js';
|
||||
|
||||
// Validate environment variables
|
||||
try {
|
||||
@ -78,6 +79,7 @@ fastify.register(galleryRoute, { prefix: '/api' });
|
||||
fastify.register(contentRoute, { prefix: '/api' });
|
||||
fastify.register(settingsRoute, { prefix: '/api' });
|
||||
fastify.register(publishRoute, { prefix: '/api' });
|
||||
fastify.register(bannersRoute, { prefix: '/api' });
|
||||
|
||||
// Health check
|
||||
fastify.get('/health', async () => {
|
||||
|
||||
Reference in New Issue
Block a user