feat: implement backend API for event management (task 13)
- Create eventController with CRUD operations and registration endpoints - Implement eventService with Prisma database operations - Add event routes with authentication middleware - Support event creation, listing, filtering, registration/unregistration - Include spatial data handling for event locations - Add participant count tracking and registration status checks - Requirements: 4.1, 4.2, 4.3, 4.4
This commit is contained in:
@@ -4,6 +4,7 @@ import helmet from 'helmet';
|
||||
import dotenv from 'dotenv';
|
||||
import path from 'path';
|
||||
import reportRoutes from './routes/reportRoutes';
|
||||
import eventRoutes from './routes/eventRoutes';
|
||||
|
||||
// Load environment variables
|
||||
dotenv.config();
|
||||
@@ -33,6 +34,7 @@ app.get('/health', (req, res) => {
|
||||
|
||||
// API Routes
|
||||
app.use('/api/reports', reportRoutes);
|
||||
app.use('/api/events', eventRoutes);
|
||||
|
||||
// Error handling middleware
|
||||
app.use((err: any, req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
|
||||
Reference in New Issue
Block a user