Skip to content

Commit

Permalink
Merge pull request #12 from codingknite/test-api-fix
Browse files Browse the repository at this point in the history
minor test api fix
  • Loading branch information
codingknite authored Aug 15, 2024
2 parents c48513b + b0e2a09 commit a542595
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions lib/hooks/useArweaveId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,26 @@ interface Props {
}

export default function useArweaveId({ block }: Props) {
// const fetchArweaveId = async() => {
// const response = await fetch(config.googleCloud.nextAPI, {
// method: 'POST',
// body: JSON.stringify({
// blockNumber: block,
// }),
// headers: {
// 'Content-Type': 'application/json',
// },
// });

// if (response.ok && response.status === 200) {
// const data = (await response.json()) as ArweaveIdProps;
// return data.arweaveId;
// }
// };

const fetchArweaveId = async() => {
const response = await fetch(config.googleCloud.nextAPI, {
method: 'POST',
body: JSON.stringify({
blockNumber: block,
}),
headers: {
'Content-Type': 'application/json',
},
method: 'GET',
});

if (response.ok && response.status === 200) {
Expand Down

0 comments on commit a542595

Please sign in to comment.