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:
2025-11-16 20:15:41 +00:00
parent b19b93d32d
commit 88117567ab
4 changed files with 645 additions and 0 deletions

View File

@@ -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) => {