Skip to content

fix: product types attributes fetching#517

Merged
valentinludu merged 1 commit into
devfrom
fix/product-types-attributes
May 22, 2026
Merged

fix: product types attributes fetching#517
valentinludu merged 1 commit into
devfrom
fix/product-types-attributes

Conversation

@mixplore

@mixplore mixplore commented May 21, 2026

Copy link
Copy Markdown
Contributor

The https://api.nexusmutual.io/v2/product-types?withAttributes=ipfsContentType endpoint does not include the commission data for product types. This PR fixes that by removing the withAttributes - https://api.nexusmutual.io/v2/product-types includes both the commission data and ipfs content type.

Summary by CodeRabbit

  • Refactor
    • Updated product type retrieval to use simplified endpoint requests for improved consistency.

Review Change Stack

@mixplore mixplore requested a review from valentinludu May 21, 2026 15:23
@mixplore mixplore self-assigned this May 21, 2026
@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9f71d36e-0eac-41fc-a682-26d9ba0b9f2b

📥 Commits

Reviewing files that changed from the base of the PR and between 21208af and 449c99c.

📒 Files selected for processing (1)
  • src/product-api/ProductAPI.ts

📝 Walkthrough

Walkthrough

The getProductTypeById and getAllProductTypes methods in ProductAPI.ts were updated to remove the ?withAttributes=ipfsContentType query parameter from their endpoint requests, simplifying the URLs called by these methods.

Changes

ProductAPI Query Parameter Removal

Layer / File(s) Summary
ProductAPI endpoint calls
src/product-api/ProductAPI.ts
The getProductTypeById and getAllProductTypes methods have their request paths updated to remove the ?withAttributes=ipfsContentType query parameter from both /product-types/:id and /product-types endpoints.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: product types attributes fetching' directly relates to the main change: removing the withAttributes query parameter from product type endpoints to fix missing commission data.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/product-types-attributes
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/product-types-attributes

Comment @coderabbitai help to get the list of available commands and usage tips.

@valentinludu valentinludu merged commit d94da47 into dev May 22, 2026
3 checks passed
@valentinludu valentinludu deleted the fix/product-types-attributes branch May 22, 2026 12:07
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