Skip to content

Commit

Permalink
feat: add check for correct asset: "asset-1" and make sure return cod…
Browse files Browse the repository at this point in the history
…e for scripts is <=200 and <300
  • Loading branch information
nikschul committed Oct 7, 2024
1 parent 27bef08 commit 54d808c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions deployment/postman/MVD.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@
"script": {
"exec": [
"// get the contact agreement id and save it as an environment variable",
"if(pm.response.code==200){",
"if(pm.response.code < 300 && pm.response.code >= 200){",
" //using the first contract agreement id found",
" const contractAgreementId = pm.response.json()[0][\"contractAgreementId\"];",
" pm.environment.set(\"CONTRACT_AGREEMENT_ID\", contractAgreementId);",
Expand Down Expand Up @@ -553,7 +553,7 @@
"script": {
"exec": [
"if(!pm.environment.has(\"CONTRACT_AGREEMENT_ID\")){",
" throw new Error('Contract Agreement ID is not yet available, please execute request \"Initiate Negotiation and Get Contract Negotiation\" first!');",
" throw new Error('Contract Agreement ID is not yet available, please execute requests \"Initiate Negotiation and Get Contract Negotiation\" first!');",
"}"
],
"type": "text/javascript",
Expand Down Expand Up @@ -626,8 +626,7 @@
"script": {
"exec": [
"// get the transfer process id of \"asset-1\" and save it as an environment variable",
"if(pm.response.code==200){",
" //using the first transfer process id found",
"if(pm.response.code < 300 && pm.response.code >= 200){",
" const transferProcessId = pm.response.json()[0][\"transferProcessId\"];",
" pm.environment.set(\"TRANSFER_PROCESS_ID\", transferProcessId);",
"}",
Expand Down Expand Up @@ -681,7 +680,7 @@
"script": {
"exec": [
"// get the authorization token and save it as an environment variable",
"if(pm.response.code==200){",
"if(pm.response.code < 300 && pm.response.code >= 200){",
" //using the first authorization token found",
" const authorization = pm.response.json()[\"authorization\"];",
" pm.environment.set(\"AUTHORIZATION\", authorization);",
Expand Down

0 comments on commit 54d808c

Please sign in to comment.