feat: Implement CRUD API endpoints for core modules
Adds Express.js routes and Prisma-based handlers for common database operations (Create, Read, Update, Delete) for the following modules: - Empleados (subset of Cliente model) - Asistencias - Tareas (TareaRealizada model) - Planillas Each module's routes are separated into their own files within `api/routes/`. The new routes are registered in `api/server.js`. Basic error handling, including try-catch blocks and checks for common Prisma errors (e.g., P2025 for record not found, P2003 for foreign key violations), has been implemented in each endpoint.
This commit is contained in:
@@ -7,10 +7,12 @@
|
||||
"start": "node server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/client": "^6.7.0",
|
||||
"@prisma/client": "^6.8.2",
|
||||
"express": "^4.18.2",
|
||||
"node-cron": "^4.0.5",
|
||||
"pg": "^8.8.0",
|
||||
"prisma": "^6.7.0"
|
||||
"pg": "^8.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prisma": "^6.8.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user