Skip to content

Refactor API response to use top-level 'data' attribute for consistency#524

Open
Alsrory wants to merge 1 commit into
opcodesio:mainfrom
Alsrory:fix-json-api-response
Open

Refactor API response to use top-level 'data' attribute for consistency#524
Alsrory wants to merge 1 commit into
opcodesio:mainfrom
Alsrory:fix-json-api-response

Conversation

@Alsrory

@Alsrory Alsrory commented Jun 9, 2026

Copy link
Copy Markdown

This PR refactors the API response structure to use a top-level data attribute for the folders list.

Reason: This ensures consistency with standard API patterns and provides a clean namespace for future metadata (e.g., meta, links) without causing breaking changes or frontend parsing issues.

Changes: Updated FoldersController to wrap the resource collection, and adjusted the frontend axios response handler to parse data.data.

I have verified the changes locally, and the data is correctly received and parsed by the frontend.

@arukompas arukompas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Missing test coverage for the change
  2. UI needs to be backwards compatible, as publishing updated UI assets is optional.
  3. Formatting is out of place

@Alsrory

Alsrory commented Jun 11, 2026 via email

Copy link
Copy Markdown
Author

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.

2 participants