[Functionality] Request DID Resolution
Some checks failed
checks-impure / test (pull_request) Successful in 29s
checks / test (pull_request) Failing after 2m50s

- fetch resolution data
- adjustments
This commit is contained in:
Onur Arslan
2023-12-10 00:15:34 +01:00
parent fa4fb0356e
commit 5262d83da0
6 changed files with 26 additions and 24 deletions

View File

@@ -28,17 +28,7 @@ export default function AccessPoint() {
.then((resp) =>
resp.json().then((jsonData) => {
console.log(jsonData);
const transformedData = jsonData.map(
(item: { service_name: any; entity_did: any; network: any }) => ({
entity_name: item.service_name,
entity_did: item.entity_did,
network: item.network,
ip_address: "",
}),
);
setRepositoryData(transformedData);
setRepositoryData(jsonData);
}),
)
.then()

View File

@@ -16,7 +16,6 @@ export default function Client1() {
useEffect(() => {
fetch("http://localhost:2979/api/v1/get_consumers", {
method: "GET",
// credentials: 'include',
})
.then((resp) =>
resp.json().then((jsonData) => {
@@ -29,7 +28,6 @@ export default function Client1() {
fetch("http://localhost:2979/api/v1/get_producers", {
method: "GET",
// credentials: 'include',
})
.then((resp) =>
resp.json().then((jsonData) => {

View File

@@ -16,7 +16,6 @@ export default function Client1() {
useEffect(() => {
fetch("http://localhost:2979/api/v1/get_consumers", {
method: "GET",
// credentials: 'include',
})
.then((resp) =>
resp.json().then((jsonData) => {

View File

@@ -1,14 +1,30 @@
"use client";
import {
DLGResolutionDummyData,
DLGResolutionTableConfig,
DLGSummaryDetails,
} from "@/mock/dlg";
import CustomTable from "@/components/table";
import SummaryDetails from "@/components/summary_card";
import {useEffect, useState} from "react";
export default function DLG() {
const [resolutionData, setResolutionData] = useState([]);
useEffect(() => {
fetch("http://localhost:2979/api/v1/get_resolutions", {
method: "GET",
})
.then((resp) =>
resp.json().then((jsonData) => {
console.log(jsonData);
setResolutionData(jsonData);
}),
)
.then()
.catch();
}, []);
return (
<div className="m-10">
<SummaryDetails
@@ -21,7 +37,7 @@ export default function DLG() {
<div>
<h4>DID Resolution View</h4>
<CustomTable
data={DLGResolutionDummyData}
data={resolutionData}
configuration={DLGResolutionTableConfig}
/>
</div>

View File

@@ -12,7 +12,6 @@ export default function Home() {
useEffect(() => {
fetch("http://localhost:2979/api/v1/get_entities", {
method: "GET",
// credentials: 'include',
})
.then((resp) =>
resp.json().then((jsonData) => {