Skip to content

Refactor/standardize api responses - #163

Open
Adamsonoladipupo wants to merge 2 commits into
SwiftChainn:mainfrom
Adamsonoladipupo:refactor/standardize-api-responses
Open

Refactor/standardize api responses#163
Adamsonoladipupo wants to merge 2 commits into
SwiftChainn:mainfrom
Adamsonoladipupo:refactor/standardize-api-responses

Conversation

@Adamsonoladipupo

Copy link
Copy Markdown

Summary

Standardized API JSON responses across the backend controllers using a reusable response wrapper.

Changes

  • Added a centralized response wrapper utility.
  • Refactored existing controllers to use the standardized response format.
  • Standardized successful and error responses.
  • Preserved existing HTTP status codes and business logic.
  • Added/updated tests for the standardized response structure.
  • Maintained the existing Controller → Service → Model architecture.

Standard Response Format

{
  "success": true,
  "data": {},
  "error": null,
  "message": "Operation successful"
}

Error responses follow the same structure with success: false.

Verification

  • Tests: Passed
  • Type checking: Passed
  • Linting: Passed
  • Build: Passed

Proof of Work

API responses were verified locally and confirmed to follow the standardized response structure.

Closes #105

@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@Adamsonoladipupo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[Refactor] Standardize API JSON response wrappers across all controllers

1 participant