Closed Harman-singh-waraich closed 3 months ago
Name | Link |
---|---|
Latest commit | |
Latest deploy log | https://app.netlify.com/sites/kleros-api/deploys/6661c35f9522ed00a0c95892 |
Deploy Preview | https://deploy-preview-14--kleros-api.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
The recent changes introduce a new parameter pinToGraph
in the pinFiles
function to control whether files should be pinned to a graph. Additionally, the update includes handling inconsistent CIDs between Filebase and Graph Node, and returning these inconsistencies in the response. The publishToGraph.js
file has been added to facilitate sending files to the IPFS network via The Graph hosted IPFS node, and node-fetch
has been added as a dependency.
File Path | Change Summary |
---|---|
functions/upload-to-ipfs.ts | Introduced pinToGraph parameter in pinFiles function, handling for inconsistent CIDs, and updated handler logic. |
package.json | Added node-fetch dependency. |
utils/publishToGraph.js | Added functions for uploading files to IPFS via The Graph hosted IPFS node, checking CID consistency. |
sequenceDiagram
participant User
participant Handler
participant PinFiles
participant PublishToGraph
participant Filebase
participant GraphNode
User->>Handler: Upload files with pinToGraph
Handler->>PinFiles: Call pinFiles with data and pinToGraph
PinFiles->>Filebase: Upload files to Filebase
PinFiles->>GraphNode: (Conditional) Upload files to GraphNode
GraphNode-->>PinFiles: Return Graph CIDs
PinFiles-->>Handler: Return CIDs and inconsistent CIDs
Handler-->>User: Response with CIDs and inconsistent CIDs
In the meadow where code does bloom,
A new feature dances, dispelling gloom,
Pinning files to graph with care,
CIDs checked, inconsistencies laid bare.
Withnode-fetch
in our pack,
To the IPFS, there's no turning back.
πΈπβ¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Dependencies
node-fetch
version 3.3.2 to the project dependencies.