Skip to content
Permalink
Browse files

fix bash script

  • Loading branch information
stremovsky committed Jan 27, 2020
1 parent cefb46a commit 3f176d327cf671e6bcbae1eca7c47c01d37140aa
Showing with 2 additions and 2 deletions.
  1. +2 −2 create-test-user.sh
@@ -27,12 +27,12 @@ RESULT=`curl -s http://localhost:3000/v1/user \
-H "X-Bunker-Token: $XTOKEN" -H "Content-Type: application/json" \
-d '{"fname":"Test","lname":"Account","email":"test@paranoidguy.com","phone":"4444"}'`
STATUS=`echo $RESULT | jq ".status" | tr -d '"'`
if [ "$STATUS" == "error" ]; then
if [ "$STATUS" = "error" ]; then
echo "Error to create user, trying to lookup by email."
RESULT=`curl -s http://localhost:3000/v1/user/email/test@paranoidguy.com -H "X-Bunker-Token: $XTOKEN"`
STATUS=`echo $RESULT | jq ".status" | tr -d '"'`
fi
if [ "$STATUS" == "error" ]; then
if [ "$STATUS" = "error" ]; then
echo "Failed to fetch user by email, got: $RESULT"
exit
fi

0 comments on commit 3f176d3

Please sign in to comment.
You can’t perform that action at this time.