Skip to content

Commit

Permalink
feat : fixed phygital details post method
Browse files Browse the repository at this point in the history
  • Loading branch information
surajhub255 committed Aug 17, 2024
1 parent d285d9c commit cb95b63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/review/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,15 @@ export default function Review() {
chaintype_id: chaintype,
}),
});

const phygital = await phygitalResponse.json();
localStorage.setItem("PhygitalId", phygital.id);

if (!phygitalResponse.ok) {
throw new Error('Failed to create phygital data');
}

localStorage.setItem("PhygitalId", phygitalId);

// Post request for Phygital Details data
const phygitalDetailsResponse = await fetch(`${apiUrl}/phygitals/${phygitalId}`, {
const phygitalDetailsResponse = await fetch(`${apiUrl}/phygitals/${phygital.id}`, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
Expand Down

0 comments on commit cb95b63

Please sign in to comment.