BE12 – Mobile Application Backend and Refactor Mobile Layer#203
Conversation
7375f51 to
a7fb473
Compare
nethmiWee
left a comment
There was a problem hiding this comment.
Please resolve conflicts in files
routes/index.js
services/authService.js
services/recommendationService.js
test/recommendationService.test.js
dbConnection.js
index.yaml
The BE12 and B13 branches contain features developed after Sprint 2. Therefore, additional conflicts may arise if they are not merged immediately. I will revise everything before the end of Sprint 2 to ensure there are no more conflicts. |
datnq2001
left a comment
There was a problem hiding this comment.
I have reviewed and tested the changes. Everything is working well on my side, and I did not find any issues during the check. Good work!
Summary
This branch removes the separate mobile API layer and shifts the backend toward reusing existing shared APIs for both web and mobile clients. Instead of maintaining
/api/mobile/*, the work standardizes existing routes where needed, improves response consistency, keeps the auth/session flow usable for mobile, and updates the OpenAPI spec to match the real backend behavior more closely. It also includes a merge frommasterwith conflicts resolved so the branch is up to date.What Main File Change
Removed the mobile-only API surface:
routes/mobile.jscontroller/mobileController.jsservices/mobile/*,repositories/mobile/*Refactored shared existing routes for frontend/mobile compatibility:
controller/authController.jsservices/authService.jsrepositories/authRepository.jscontroller/notificationController.jscontroller/mealplanController.jscontroller/recommendationController.jsservices/recommendationService.jsrepositories/recommendationRepository.jscontroller/userProfileController.jsservices/apiResponseService.jsservices/serviceError.jsUpdated routing behavior to support shared client usage:
routes/index.jsroutes/notifications.jsroutes/mealplan.jsUpdated documentation/spec:
index.yamlREADME.mdMerged latest
masterintobe12-mobile-api-supportand resolved conflicts in:README.mdcontroller/authController.jscontroller/notificationController.jscontroller/userProfileController.jsindex.yamlservices/authService.jsservices/recommendationService.jsservices/serviceError.jstest/recommendationService.test.jsValidation
Removed
/api/mobileand kept shared existing APIs as the integration path.Verified
index.yamlparses successfully.Verified merged JS files with
node --check.Ran targeted tests for auth/recommendation flows:
test/recommendationService.test.jstest/recommendationController.test.jstest/authService.mobileSessions.test.jstest/authService.refreshRotation.test.jstest/authenticateToken.test.jsResult:
masterlogging dependency usage (winston) inauthenticateTokentest environment, which looks like an environment/dependency install state issue rather than a merge-conflict logic issue