Skip to content

Commit 917d5bc

Browse files
committed
add auth sig for edit article
1 parent b83ba82 commit 917d5bc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pages/edit.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,13 @@ export default function EditItem() {
126126
const addedNFT = await addToIPFS(nftData)
127127
// TODO: need fix this url?
128128
const dweb_search_url = `https://dweb-search-api.anwen.cc/edit_meta`
129+
130+
const sig_login = localStorage.getItem("sig_login")
131+
const aethAccount = localStorage.getItem("ethAccount")
132+
axios.defaults.headers.common['authorization'] = `Bearer ${sig_login}`
133+
axios.defaults.headers.common['address'] = aethAccount
129134
const ret = await axios.post(dweb_search_url, {
135+
// headers: {"Authorization" : `Bearer ${tokenStr}`},
130136
previous_path: cid,
131137
path: addedNFT.path,
132138
eth: ethAccount,

0 commit comments

Comments
 (0)