Skip to content

Commit

Permalink
test: take lastItem instead of firstItem
Browse files Browse the repository at this point in the history
  • Loading branch information
nanderstabel committed Dec 2, 2024
1 parent b3a5289 commit 5464da1
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions agent_api_rest/postman/ssi-agent.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -801,10 +801,10 @@
"const jsonData = JSON.parse(responseBody);",
"",
"if (Array.isArray(jsonData) && jsonData.length > 0) {",
" const firstItem = jsonData[0];",
" const lastItem = jsonData[jsonData.length - 1];",
"",
" if (firstItem && typeof firstItem === 'object') {",
" const receivedOfferId = firstItem.received_offer_id;",
" if (lastItem && typeof lastItem === 'object') {",
" const receivedOfferId = lastItem.received_offer_id;",
"",
" if (receivedOfferId) {",
" pm.collectionVariables.set(\"RECEIVED_OFFER_ID\", receivedOfferId);",
Expand Down Expand Up @@ -917,10 +917,10 @@
"const jsonData = JSON.parse(responseBody);",
"",
"if (Array.isArray(jsonData) && jsonData.length > 0) {",
" const firstItem = jsonData[0];",
" const lastItem = jsonData[jsonData.length - 1];",
"",
" if (firstItem && typeof firstItem === 'object') {",
" const holderCredentialId = firstItem.holder_credential_id;",
" if (lastItem && typeof lastItem === 'object') {",
" const holderCredentialId = lastItem.holder_credential_id;",
"",
" if (holderCredentialId) {",
" pm.collectionVariables.set(\"HOLDER_CREDENTIAL_ID\", holderCredentialId);",
Expand Down Expand Up @@ -988,10 +988,10 @@
"const jsonData = JSON.parse(responseBody);",
"",
"if (Array.isArray(jsonData) && jsonData.length > 0) {",
" const firstItem = jsonData[0];",
" const lastItem = jsonData[jsonData.length - 1];",
"",
" if (firstItem && typeof firstItem === 'object') {",
" const presentationId = firstItem.presentation_id;",
" if (lastItem && typeof lastItem === 'object') {",
" const presentationId = lastItem.presentation_id;",
"",
" if (presentationId) {",
" pm.collectionVariables.set(\"PRESENTATION_ID\", presentationId);",
Expand Down Expand Up @@ -1141,10 +1141,10 @@
"const jsonData = JSON.parse(responseBody);",
"",
"if (Array.isArray(jsonData) && jsonData.length > 0) {",
" const firstItem = jsonData[0];",
" const lastItem = jsonData[jsonData.length - 1];",
"",
" if (firstItem && typeof firstItem === 'object') {",
" const connectionId = firstItem.connection_id;",
" if (lastItem && typeof lastItem === 'object') {",
" const connectionId = lastItem.connection_id;",
"",
" if (connectionId) {",
" pm.collectionVariables.set(\"CONNECTION_ID\", connectionId);",
Expand Down Expand Up @@ -1194,10 +1194,10 @@
"const jsonData = JSON.parse(responseBody);",
"",
"if (Array.isArray(jsonData) && jsonData.length > 0) {",
" const firstItem = jsonData[0];",
" const lastItem = jsonData[jsonData.length - 1];",
"",
" if (firstItem && typeof firstItem === 'object') {",
" const connectionId = firstItem.connection_id;",
" if (lastItem && typeof lastItem === 'object') {",
" const connectionId = lastItem.connection_id;",
"",
" if (connectionId) {",
" pm.collectionVariables.set(\"CONNECTION_ID\", connectionId);",
Expand Down Expand Up @@ -1242,10 +1242,10 @@
"const jsonData = JSON.parse(responseBody);",
"",
"if (Array.isArray(jsonData) && jsonData.length > 0) {",
" const firstItem = jsonData[0];",
" const lastItem = jsonData[jsonData.length - 1];",
"",
" if (firstItem && typeof firstItem === 'object') {",
" const connectionId = firstItem.connection_id;",
" if (lastItem && typeof lastItem === 'object') {",
" const connectionId = lastItem.connection_id;",
"",
" if (connectionId) {",
" pm.collectionVariables.set(\"CONNECTION_ID\", connectionId);",
Expand Down Expand Up @@ -1301,10 +1301,10 @@
"const jsonData = JSON.parse(responseBody);",
"",
"if (Array.isArray(jsonData) && jsonData.length > 0) {",
" const firstItem = jsonData[0];",
" const lastItem = jsonData[jsonData.length - 1];",
"",
" if (firstItem && typeof firstItem === 'object') {",
" const connectionId = firstItem.connection_id;",
" if (lastItem && typeof lastItem === 'object') {",
" const connectionId = lastItem.connection_id;",
"",
" if (connectionId) {",
" pm.collectionVariables.set(\"CONNECTION_ID\", connectionId);",
Expand Down Expand Up @@ -1442,10 +1442,10 @@
"const jsonData = JSON.parse(responseBody);",
"",
"if (Array.isArray(jsonData) && jsonData.length > 0) {",
" const firstItem = jsonData[0];",
" const lastItem = jsonData[jsonData.length - 1];",
"",
" if (firstItem && typeof firstItem === 'object') {",
" const serviceId = firstItem.service_id;",
" if (lastItem && typeof lastItem === 'object') {",
" const serviceId = lastItem.service_id;",
"",
" if (serviceId) {",
" pm.collectionVariables.set(\"SERVICE_ID\", serviceId);",
Expand Down

0 comments on commit 5464da1

Please sign in to comment.