Skip to content

Commit

Permalink
feat(api): new getProofById (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Feb 26, 2024
1 parent 662a3f0 commit 518e84d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/services/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ export default {
.then((response) => response.json())
},

// will return only the user's proof
getProofById(proofId) {
const store = useAppStore()
const url = `${import.meta.env.VITE_OPEN_PRICES_API_URL}/proofs/${proofId}`
return fetch(url, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${store.user.token}`
},
})
.then((response) => response.json())
},

deleteProof(proofId) {
const store = useAppStore()
return fetch(`${import.meta.env.VITE_OPEN_PRICES_API_URL}/proofs/${proofId}`, {
Expand Down

0 comments on commit 518e84d

Please sign in to comment.