Commit Graph

11 Commits

Author SHA1 Message Date
julien 96da68e18e chore(deps): upgrade to Express 5 and remove redundant middleware
- Express 4 → 5.2.1
- Remove method-override (unused with Angular HttpClient) and errorhandler (superseded by exceptions.handler.js)
- Remove asyncHandler wrapper from all controllers — Express 5 propagates async rejections natively
- Remove body-parser (redundant, Express 5 includes it internally)
- Patch/minor updates: cors, dotenv, ejs, express-jwt, express-session, jsonwebtoken, morgan, mysql2, sequelize, underscore
- Dev updates: eslint 9.0→9.39, nodemon 2→3, globals, sequelize-cli
- Fix getUser endpoint to include SkydiverProfile data in response
- docs: add ADR 0013, update README
2026-05-01 20:42:39 +02:00
julien 80cd96e006 chore(deps): add helmet, express-rate-limit, express-validator
Add production dependencies introduced in recent security commits.
Add docs/ENVIRONMENT_VARIABLES.md documenting TRUST_PROXY, SECRET,
SESSION_SECRET, and ALLOWED_ORIGINS with configuration guidance.
2026-04-26 23:52:09 +02:00
julien da1f9437ab feat(tests): add Jest+Supertest infrastructure with jump route suite (14 tests)
- Extract Express app creation into src/createApp.js to enable testing without starting the server
- Add Jest, Supertest, test helpers (createTestApp, auth token generator)
- Write 14 integration tests for skydive/jumps: auth protection, CRUD, ownership checks

Bugs caught and fixed by the test suite:
- MongoDB models: author field typed as Schema.Types.UUID (Mongoose 6 rejects string UUIDs) → changed to String
- Jump.toJSONFor: called toProfileJSONFor on a UUID string → guarded with typeof check
- exceptions.handler: used err.statusCode but express-jwt throws err.status → returns 500 on 401 errors
- Jump.count(query): deprecated Mongoose method was ignoring the filter → replaced with countDocuments
- jumps.routes GET /: $or query included non-schema field "title" stripped by strictQuery, leaving {} (match-all) → replaced with slug/lieu search
- $regex: was passing a JS RegExp object which serializes to {} in MongoDB → now passes raw string
2026-04-26 01:23:01 +02:00
julien fe1bcc0ff7 Adding Swagger 2026-03-29 23:56:11 +02:00
julien c318012363 Package.json update 2026-03-21 02:32:20 +01:00
julien b710b34569 fix(user): persist updateUser correctly; add setup:api script and README update; seeders tweaks 2025-12-05 01:33:38 +01:00
julien f29b08556d Mise à jour de la commande de test API via newman 2025-11-30 17:55:07 +01:00
Rampeur c9ce3f343e Mise à jours de packages 2025-08-29 16:10:14 +02:00
Rampeur 49b1a3f6b3 Ajout de la base de données MySQL 2025-08-13 21:51:07 +02:00
Rampeur be44e4fdf0 Ajout des fichiers .env 2025-08-08 18:08:01 +02:00
Rampeur ffdc93834a Ajout initial des fichiers du projet 2025-08-08 10:47:29 +02:00