11 Commits

Author SHA1 Message Date
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 ace057d379 Creating a config folder and moving the ‘env’ files 2026-03-21 02:23:36 +01:00
julien c581006121 Mise à jour du main script de l'API 2025-11-30 17:57:00 +01:00
julien 60feffd929 Refactoring et ajout de routes Hero Wars 2025-11-27 10:50:17 +01:00
Rampeur b1513dccdd Mise à jour de controleurs, models et routes 2025-08-19 05:13:24 +02:00
Rampeur 5d361da628 Réorganisation des sources 2025-08-15 19:39:35 +02:00
Rampeur ea2d177c4c Réorganisation des sources 2025-08-15 17:29:23 +02:00
Rampeur 8a011af73a Utilisation simultanée de mongodb et mysql 2025-08-14 18:22:05 +02:00
Rampeur 49b1a3f6b3 Ajout de la base de données MySQL 2025-08-13 21:51:07 +02:00
Rampeur ffdc93834a Ajout initial des fichiers du projet 2025-08-08 10:47:29 +02:00