- Implemented `validatePlayer` and `normalizeTabInfo` functions in `database/validate.js` for player data validation and normalization. - Added error handling for required fields and enforced data types and constraints. - Introduced standardization for characteristics and skills. feat: Create script for extracting rules from PDF files - Developed `extract-rules.js` to extract text from PDF rulebooks and categorize rules. - Integrated `pdftotext` for PDF processing and created a searchable rules database. - Implemented rule categorization and indexing for efficient searching. feat: Implement RulesTab component for rule searching - Created `RulesTab.jsx` for searching and displaying rules with filtering options. - Added recent searches and quick reference buttons for user convenience. - Integrated API calls for fetching rules and displaying results dynamically. feat: Add test script for Rules API - Created `test-rules.js` to test the functionality of the Rules API endpoints. - Included tests for search and stats endpoints to ensure proper response handling.
23 lines
518 B
JavaScript
23 lines
518 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
|
|
console.log('Simple rules routes loading...');
|
|
|
|
// Test route
|
|
router.get('/test', (req, res) => {
|
|
console.log('Simple test route hit!');
|
|
res.json({ message: 'Simple rules test working!' });
|
|
});
|
|
|
|
// Stats route
|
|
router.get('/stats', (req, res) => {
|
|
console.log('Simple stats route hit!');
|
|
res.json({
|
|
totalRules: 288,
|
|
message: 'Simple stats working!'
|
|
});
|
|
});
|
|
|
|
console.log('Simple rules routes registered');
|
|
module.exports = router;
|