mirror of
				https://github.com/optim-enterprises-bv/databunker.git
				synced 2025-11-03 19:37:48 +00:00 
			
		
		
		
	fix bash script
This commit is contained in:
		@@ -27,12 +27,12 @@ RESULT=`curl -s http://localhost:3000/v1/user \
 | 
				
			|||||||
  -H "X-Bunker-Token: $XTOKEN" -H "Content-Type: application/json" \
 | 
					  -H "X-Bunker-Token: $XTOKEN" -H "Content-Type: application/json" \
 | 
				
			||||||
  -d '{"fname":"Test","lname":"Account","email":"test@paranoidguy.com","phone":"4444"}'`
 | 
					  -d '{"fname":"Test","lname":"Account","email":"test@paranoidguy.com","phone":"4444"}'`
 | 
				
			||||||
STATUS=`echo $RESULT | jq ".status" | tr -d '"'`
 | 
					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."
 | 
					  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"`
 | 
					  RESULT=`curl -s http://localhost:3000/v1/user/email/test@paranoidguy.com -H "X-Bunker-Token: $XTOKEN"`
 | 
				
			||||||
  STATUS=`echo $RESULT | jq ".status" | tr -d '"'`
 | 
					  STATUS=`echo $RESULT | jq ".status" | tr -d '"'`
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
if [ "$STATUS" == "error" ]; then
 | 
					if [ "$STATUS" = "error" ]; then
 | 
				
			||||||
  echo "Failed to fetch user by email, got: $RESULT"
 | 
					  echo "Failed to fetch user by email, got: $RESULT"
 | 
				
			||||||
  exit
 | 
					  exit
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user