Commit Graph

116 Commits

Author SHA1 Message Date
86ccc3ef4f feat: add getUserById endpoint for admin user details
Added GET /api/admin/users/:id endpoint to retrieve detailed user
information including contact info, personal data, and ticket statistics.
This enables the admin interface to display comprehensive user details
when clicking the "Détails" button.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 15:07:28 +01:00
e72923ec86 fix: transform pending tickets data to match frontend expectations
Updated the getPendingTickets endpoint to return nested objects for user
and prize data instead of flat SQL columns. Frontend expects structure like
ticket.user.firstName and ticket.prize.name, which now displays correctly
in the employee verification interface instead of showing N/A.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 14:30:44 +01:00
e3794e1ba8 fix: respect Docker environment variables over .env file
Changed dotenv.config({ override: true }) to { override: false }
This ensures environment variables from docker-compose.yml take precedence
over the embedded .env file, allowing proper DB configuration in containers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 22:00:39 +01:00
ddc4c09323 fix: update test to use correct route (/) instead of /health 2025-11-18 16:59:43 +01:00
f9dd22909c fix: convert test to ES6 modules and export app
- Convert test/app.test.js from CommonJS to ES6 import/export
- Export app from index.js for testing
- Only start server if NODE_ENV !== 'test'
- Fixes 'require is not defined' error in tests
2025-11-18 16:53:46 +01:00
51d8b0cc36 fix: resolve ESLint errors and Jest configuration
- Remove extensionsToTreatAsEsm from jest.config.js (not needed with type:module)
- Add Jest globals to ESLint config (describe, it, expect, etc.)
- Fix unnecessary escape characters in debug-token-403.js
- Change no-useless-escape from error to warning
2025-11-18 16:49:19 +01:00
c92d2c32e9 fix: simplify Jenkins triggers to use only pollSCM + add setup docs 2025-11-18 16:08:28 +01:00
c0ad39dbe9 fix: Jenkinsfile syntax (remove special characters) 2025-11-18 16:05:17 +01:00
359fee23b0 fix: add missing global variables to ESLint config
Add fetch and timer functions (setTimeout, setInterval, etc.) as
global variables in ESLint configuration to fix no-undef errors
in scripts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 15:50:37 +01:00
9330c68e5c fix: improve CI/CD quality checks and fix test/lint configuration
Backend fixes:
- Add eslint.config.js with proper ES6 module configuration
- Add jest.config.js to support ES modules
- Update package.json with @eslint/js dependency
- Configure npm test script with NODE_OPTIONS for ES modules
- Update Jenkinsfile to block deployments on failed lint/tests

This ensures:
1. ESLint works correctly with ES6 modules
2. Jest can run tests with ES6 imports
3. Deployments are blocked if quality checks fail

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 15:40:04 +01:00
caff01fc4b feat: add automatic deployment triggers to Jenkinsfile
Configure Jenkins pipeline to trigger automatically on git push:
- Add pollSCM trigger (checks every minute)
- Add Generic Webhook trigger for Gitea integration
- Add comprehensive webhook setup documentation

This enables CI/CD automation where the pipeline starts
automatically when code is pushed to the repository.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 15:23:32 +01:00
25c7a0b304 dev 2025-11-17 23:47:54 +01:00
67316ef0b1 Fix Jenkinsfile syntax (clean comments) 2025-11-04 19:00:33 +01:00
67c75963fb Fix Jenkinsfile syntax (clean comments) 2025-11-04 18:56:34 +01:00
4e855dc060 Fix Jenkinsfile syntax (clean comments) 2025-11-04 18:55:08 +01:00
31b70e9849 Fix Jenkinsfile syntax (clean comments) 2025-11-04 15:50:33 +01:00
db83f0d06f Fix Jenkinsfile syntax (clean comments) 2025-11-04 15:46:54 +01:00
91802b178b Fix Jenkinsfile syntax (clean comments) 2025-11-04 15:38:00 +01:00
cf4809be39 Fix Jenkinsfile syntax (clean comments) 2025-11-04 15:32:21 +01:00
77ed26c527 Fix Jenkinsfile syntax (clean comments) 2025-11-04 15:29:35 +01:00
5cedb52e4c Merge branch 'main' of https://gitea.wk-archi-o24a-15m-g3.fr/wkadmin/the-tip-top-backend into dev 2025-11-04 15:28:47 +01:00
bb0aa2fa44 Fix Jenkinsfile syntax (clean comments) 2025-11-04 15:28:17 +01:00
303307092f Fix Jenkinsfile syntax (clean comments) 2025-11-04 15:17:49 +01:00
7ec762cb3d Fix Jenkinsfile syntax (clean comments) 2025-11-04 15:11:50 +01:00
90f7d3bfd6 Fix Jenkinsfile syntax (clean comments) 2025-11-04 14:44:21 +01:00
6bd916f687 Fix Jenkinsfile syntax (clean comments) 2025-11-04 14:43:41 +01:00
100b12a2fa Fix Jenkinsfile syntax (clean comments) 2025-11-04 14:20:37 +01:00
ade619232e Fix Jenkinsfile syntax (clean comments) 2025-11-04 14:14:09 +01:00
daec16f002 Fix Jenkinsfile syntax (clean comments) 2025-11-04 14:12:28 +01:00
e55f1283b8 Fix Jenkinsfile syntax (clean comments) 2025-11-04 14:10:40 +01:00
de17e5a004 Fix Jenkinsfile syntax (clean comments) 2025-11-04 14:10:14 +01:00
3ddf94cce2 Fix Jenkinsfile syntax (clean comments) 2025-11-04 14:01:54 +01:00
e97a6c47e9 Fix Jenkinsfile syntax (clean comments) 2025-11-04 13:31:28 +01:00
f84866c2d8 Fix Jenkinsfile syntax (clean comments) 2025-11-04 02:53:05 +01:00
c1ed0e37b0 Fix Jenkinsfile syntax (clean comments) 2025-11-04 02:48:33 +01:00
f611d2c080 Fix Jenkinsfile syntax (clean comments) 2025-11-04 02:08:22 +01:00
bffd84bd17 flatten backend folder 2025-11-04 01:15:57 +01:00
bf50fa2246 flatten backend folder 2025-11-04 00:28:08 +01:00
923d30f8c6 flatten backend folder 2025-11-04 00:25:51 +01:00
c87a37a826 flatten backend folder 2025-11-04 00:11:07 +01:00
8f2d19d97f flatten backend folder 2025-11-03 23:17:36 +01:00
04598dbc57 Mise à jour de index.js 2025-11-03 23:13:04 +01:00
c3c3d45d6f Mise à jour de index.js 2025-11-03 23:00:35 +01:00
d06a461973 Mise à jour de index.js 2025-11-03 22:58:14 +01:00
0b039f315b Mise à jour de index.js 2025-11-03 22:56:53 +01:00
4c687bdcab Mise à jour de index.js 2025-11-03 22:55:52 +01:00
f2afdaaff7 Mise à jour de index.js 2025-11-03 22:41:20 +01:00
559f31b190 Mise à jour de index.js 2025-11-03 22:36:59 +01:00
2268fc06c5 Mise à jour de index.js 2025-11-03 22:29:45 +01:00
622053c08e Mise à jour de index.js 2025-11-03 22:19:36 +01:00