Skip to content

fix: return created routine data in response#478

Open
mrdeyroy wants to merge 1 commit into
aryandas2911:mainfrom
mrdeyroy:fix/routine-creation-response
Open

fix: return created routine data in response#478
mrdeyroy wants to merge 1 commit into
aryandas2911:mainfrom
mrdeyroy:fix/routine-creation-response

Conversation

@mrdeyroy
Copy link
Copy Markdown

📌 Description

This PR fixes a bug in routineController.js where the createRoutine API was incorrectly passing the newly created routine as a second argument to res.json(), causing Express to ignore it. The response shape has been updated to correctly return the data inside a single object.

🔗 Related Issue

Closes ##441

🛠 Changes Made

  • Updated the response shape in backend/controllers/routineController.js for the createRoutine endpoint.
  • Ensured the data payload returns the newRoutine object.
  • Adhered strictly to the consistent JSON response format without modifying any other files or variables.

📸 Screenshots (if applicable)

N/A - Backend API response fix only.

✅ Checklist

  • Code runs locally
  • Followed project structure
  • No console errors
  • Properly tested changes
  • Linked the issue

🚀 Notes for Reviewers

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant