-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: content_cid not id is used from nft data upload not uploads #1755
Conversation
Deploying with Cloudflare Pages
|
packages/api/src/utils/db-client.js
Outdated
@@ -125,20 +125,20 @@ export class DBClient { | |||
updated_at: now, | |||
}) | |||
.select(this.uploadQuery) | |||
.eq('id', data.id) | |||
.eq('content_cid', data.content_cid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to update the upload via the CID the user knows it by (the source_cid
). This is not necessarily our normalized v1 CID.
Also the upload listing does not list normalized CIDs so for anyone uploading or pinning v0 CIDs they'll not be able to update their upload (see here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to source_id, @alanshaw does this handle the case of v0 CID's? Is there special precautions or exceptions to make for v0 I need to write?
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
We had been using ID but id is not accurate, content_cid is the id that relates nft uploads to uploads.