From 62f1ffbaf0d87af69a9292861d8a7fa61e382ca0 Mon Sep 17 00:00:00 2001 From: Michael Shihjay Chen Date: Fri, 31 Jan 2025 19:44:45 -0800 Subject: [PATCH] debug --- pages/api/vp/response.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/api/vp/response.ts b/pages/api/vp/response.ts index 830eac6f..88cefa97 100644 --- a/pages/api/vp/response.ts +++ b/pages/api/vp/response.ts @@ -46,7 +46,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) { const vc = decodeJWT(objectPath.get(verifiedAuthResponse, 'payload.vp.verifiableCredential.0')); if (objectPath.has(doc, 'vc')) { const vc_arr = objectPath.get(doc, 'vc'); - vc_arr.push(vc); + vc_arr.push(vc.payload); objectPath.set(doc, 'vc', vc_arr); } else { objectPath.set(doc, 'vc.0', vc); @@ -55,7 +55,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) { await gnap.insert(doc); if (objectPath.has(patient_doc, 'vc')) { const vc_arr1 = objectPath.get(patient_doc, 'vc'); - vc_arr1.push(vc); + vc_arr1.push(vc.payload); objectPath.set(patient_doc, 'vc', vc_arr1); } else { objectPath.set(patient_doc, 'vc.0', vc);