Skip to content

Commit 5f12bf8

Browse files
committed
chore: add base path to fetch
1 parent 3aa8ef7 commit 5f12bf8

File tree

1 file changed

+31
-22
lines changed
  • apps/testing-frontend/src/components/TestingView

1 file changed

+31
-22
lines changed

apps/testing-frontend/src/components/TestingView/index.tsx

+31-22
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,24 @@ export const TestingView = () => {
1414
const [verificationRequest, setVerificationRequest] = useState('');
1515
const [verificationRequestId, setVerificationRequestId] = useState('');
1616
const [disabled, setIsDisabled] = useState(true);
17-
const { data: authRequestStatus, isLoading } = useAuthRequestStatus(
17+
const { data: authRequestStatus } = useAuthRequestStatus(
1818
verificationRequestId,
1919
disabled,
2020
);
2121
const [did, setDid] = useState('');
2222

2323
const getCredentialOfferInTime = async () => {
2424
try {
25-
const response = await fetch('/api/credential-offer', {
26-
method: 'POST',
27-
body: JSON.stringify({
28-
credentialType: 'InTimeIssuance',
29-
client_id: did,
30-
}),
31-
});
25+
const response = await fetch(
26+
'/interop-testing-frontend/api/credential-offer',
27+
{
28+
method: 'POST',
29+
body: JSON.stringify({
30+
credentialType: 'InTimeIssuance',
31+
client_id: did,
32+
}),
33+
},
34+
);
3235

3336
if (!response.ok) {
3437
console.error(`Error fetching credential offer: ${response.status}`);
@@ -47,13 +50,16 @@ export const TestingView = () => {
4750

4851
const getCredentialOfferDeffered = async () => {
4952
try {
50-
const response = await fetch('/api/credential-offer', {
51-
method: 'POST',
52-
body: JSON.stringify({
53-
credentialType: 'DefferedIssuance',
54-
client_id: did,
55-
}),
56-
});
53+
const response = await fetch(
54+
'/interop-testing-frontendapi/credential-offer',
55+
{
56+
method: 'POST',
57+
body: JSON.stringify({
58+
credentialType: 'DefferedIssuance',
59+
client_id: did,
60+
}),
61+
},
62+
);
5763

5864
if (!response.ok) {
5965
console.error(`Error fetching credential offer: ${response.status}`);
@@ -72,13 +78,16 @@ export const TestingView = () => {
7278

7379
const getCredentialOfferPreAuth = async () => {
7480
try {
75-
const response = await fetch('/api/credential-offer', {
76-
method: 'POST',
77-
body: JSON.stringify({
78-
credentialType: 'PreAuthIssuance',
79-
client_id: did,
80-
}),
81-
});
81+
const response = await fetch(
82+
'/interop-testing-frontendapi/credential-offer',
83+
{
84+
method: 'POST',
85+
body: JSON.stringify({
86+
credentialType: 'PreAuthIssuance',
87+
client_id: did,
88+
}),
89+
},
90+
);
8291

8392
if (!response.ok) {
8493
console.error(`Error fetching credential offer: ${response.status}`);

0 commit comments

Comments
 (0)