Phase 1-14 complete: - Unified Express.js API (TypeScript, Prisma ORM, PostgreSQL 16) - React Admin GUI (Vite + Ant Design + Zustand) - JWT auth with refresh tokens - Influence: Campaigns, Representatives, Responses, Email Queue - Map: Locations, Cuts, Shifts, Canvassing System - NAR data import infrastructure (2025 format) - Listmonk newsletter integration - Landing page builder (GrapesJS) - MkDocs + Code Server integration - Volunteer portal with GPS tracking - Monitoring stack (Prometheus, Grafana, Alertmanager) - Pangolin tunnel integration Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
19 lines
575 B
JavaScript
19 lines
575 B
JavaScript
const express = require('express');
|
|
const authController = require('../controllers/authController');
|
|
const { requireAuth } = require('../middleware/auth');
|
|
|
|
const router = express.Router();
|
|
|
|
// POST /api/auth/login
|
|
router.post('/login', authController.login);
|
|
|
|
// POST /api/auth/logout
|
|
router.post('/logout', authController.logout);
|
|
|
|
// GET /api/auth/session
|
|
router.get('/session', authController.checkSession);
|
|
|
|
// POST /api/auth/change-password (requires authentication)
|
|
router.post('/change-password', requireAuth, authController.changePassword);
|
|
|
|
module.exports = router; |