likecoin / likecoin-button

Every Like is a reward. Turn your Likes into actual income now.
https://button.like.co/
GNU General Public License v3.0
19 stars 12 forks source link

🥅 Add alternative NFT related routes #418

Closed nwingt closed 2 years ago

nwingt commented 2 years ago

Test Cases

Now support the following routes

ISCN ID

ISCN ID (Minted NFT)

NFT Class ID

williamchong commented 2 years ago

we also need to modify the oembed regex before this change deploy

nwingt commented 2 years ago

we also need to modify the oembed regex before this change deploy

You mean adding /in/nft/(:classId|:iscnId)?

https://github.com/likecoin/likecoin-api-public/blob/57d443de8f250cec3911dcad5f67ea891c31ef58/src/routes/oembed/index.js#L80-L90

https://github.com/likecoin/likecoin-api-public/blob/57d443de8f250cec3911dcad5f67ea891c31ef58/src/routes/oembed/index.js#L130

williamchong commented 2 years ago

we also need to modify the oembed regex before this change deploy

You mean adding /in/nft/(:classId|:iscnId)?

https://github.com/likecoin/likecoin-api-public/blob/57d443de8f250cec3911dcad5f67ea891c31ef58/src/routes/oembed/index.js#L80-L90

https://github.com/likecoin/likecoin-api-public/blob/57d443de8f250cec3911dcad5f67ea891c31ef58/src/routes/oembed/index.js#L130

i mean the /in/like regex in api is actually due to hardcode redirect, in which this PR will fix so we should change the oembed api regex to use the new redirected path for iscn and nft, instead of/in/like

nwingt commented 2 years ago

The ISCN ID or the NFT Class ID is in the qs of the updated redirect path, not in the path, so it should be working without changing the API RegEx?