Skip to content

Commit 62f1ffb

Browse files
committed
debug
1 parent 7362045 commit 62f1ffb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pages/api/vp/response.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
4646
const vc = decodeJWT(objectPath.get(verifiedAuthResponse, 'payload.vp.verifiableCredential.0'));
4747
if (objectPath.has(doc, 'vc')) {
4848
const vc_arr = objectPath.get(doc, 'vc');
49-
vc_arr.push(vc);
49+
vc_arr.push(vc.payload);
5050
objectPath.set(doc, 'vc', vc_arr);
5151
} else {
5252
objectPath.set(doc, 'vc.0', vc);
@@ -55,7 +55,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
5555
await gnap.insert(doc);
5656
if (objectPath.has(patient_doc, 'vc')) {
5757
const vc_arr1 = objectPath.get(patient_doc, 'vc');
58-
vc_arr1.push(vc);
58+
vc_arr1.push(vc.payload);
5959
objectPath.set(patient_doc, 'vc', vc_arr1);
6060
} else {
6161
objectPath.set(patient_doc, 'vc.0', vc);

0 commit comments

Comments
 (0)