validate shared record code

This commit is contained in:
stremovsky
2019-12-19 10:47:48 +02:00
parent 30126381eb
commit 3f7813b3a5
4 changed files with 21 additions and 8 deletions

View File

@@ -29,6 +29,17 @@ RESULT=`curl -s http://localhost:3000/v1/userapp/token/$TOKEN/shipping \
-d '{"country":"Israel","address":"Allenby 1","postcode":"12345","status":"active"}' | jq ".status" | tr -d '"'`
echo "User shipping record created, status $RESULT"
RESULT=`curl -s http://localhost:3000/v1/sharedrecord/token/$TOKEN \
-H "X-Bunker-Token: "$DATABUNKER_APIKEY -H "Content-Type: application/json" \
-d '{"app":"shipping","fields":"address"}'`
echo "Shared record created, status $RESULT"
REC_ID=`echo $RESULT | jq ".record" | tr -d '"'`
echo $REC_ID
RESULT=`curl -s http://localhost:3000/v1/get/$REC_ID`
echo "Get shared record (no password/access token): $RESULT"
exit
RESULT=`curl -s http://localhost:3000/v1/userapp/token/$TOKEN \
-H "X-Bunker-Token: "$DATABUNKER_APIKEY -H "Content-Type: application/json"`
echo "View list of all user apps $RESULT"