Skip to content

Conversation

@schottra
Copy link
Contributor

Description

Wasn't able to test this correctly and it bit me!
The keys in the dict that comes back from the db query are numbers. The type we were using for marshaling (Wildcard) only works with strings. So attempting to marshal was throwing an exception.

However, since this is a very simple object that doesn't require any transformation, we can get by with just specifying the response type for documentation sake (and generating SDK code) and then return the response without attempting to marshal it. It gets jsonify-d anyway, and the numbers will be converted to strings as part of that process. Prior to client SDK migration, this is what we were doing.

How Has This Been Tested?

Spun up a local stack and got a user created with an NFT-connected wallet. Uploaded a NFT-gated track. Checked access to said track to make sure the endpoint was functioning again.

@changeset-bot
Copy link

changeset-bot bot commented Aug 26, 2024

⚠️ No Changeset found

Latest commit: e67d195

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@schottra schottra enabled auto-merge (squash) August 26, 2024 20:56
@schottra schottra merged commit 53deb4b into main Aug 26, 2024
@schottra schottra deleted the fix-nft-endpoint branch August 26, 2024 21:59
audius-infra pushed a commit that referenced this pull request Aug 27, 2024
[eed6296] Fix include_network_cut parameter (#9555) Marcus Pasell
[48b8641] Fix purchasers endpoint (#9549) Andrew Mendelsohn
[53deb4b] Remove marshalling for nft-gated-signatures (#9550) Randy Schott
[6b170d0] [PAY-3375] get chat endpoint correctly filters for audience:type:id (#9545) Steve Perkins
[84f4781] [PAY-3380] Skip geo indexing on local dev stack (#9544) Reed
[ba1aaed] Fix trending reward notifs (#9532) Isaac Solo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants