Skip to content

Commit 9ed4619

Browse files
committed
add auth sig check for add meta
1 parent 917d5bc commit 9ed4619

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pages/create.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ export default function CreateItem() {
9393
const addedNFT = await addToIPFS(nftData)
9494
// TODO: need fix this url?
9595
const dweb_search_url = `https://dweb-search-api.anwen.cc/add_meta`
96+
const sig_login = localStorage.getItem("sig_login")
97+
const aethAccount = localStorage.getItem("ethAccount")
98+
axios.defaults.headers.common['authorization'] = `Bearer ${sig_login}`
99+
axios.defaults.headers.common['address'] = aethAccount
96100
const ret = await axios.post(dweb_search_url, {
97101
path: addedNFT.path,
98102
eth: ethAccount,

0 commit comments

Comments
 (0)