From f4f0af0a32abbeb4695a045f86f66695d7116bf0 Mon Sep 17 00:00:00 2001 From: slaventius Date: Wed, 15 Feb 2023 16:45:02 +0300 Subject: [PATCH] * --- scripts/send_to_auth.sh | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/scripts/send_to_auth.sh b/scripts/send_to_auth.sh index 4b6ca28..d303e23 100644 --- a/scripts/send_to_auth.sh +++ b/scripts/send_to_auth.sh @@ -1,13 +1,26 @@ #!/bin/sh -for i in $(seq 1 100); -do - curl --location --request POST 'http://{address_of_ingress}/api/v1/registration' \ - --header 'x-device: android' \ - --header 'x-checksum: b25seWZvcm9iaXVzZXJzhY0e357DGJYW5kcm9pZA==' \ - --header '1673858714;' \ - --header 'Content-Type: application/x-www-form-urlencoded' \ - --data-urlencode uid=""$1"" \ - --data-urlencode email=""$1@mail.ru"" - echo "" -done +if [ -z "$1" ] + then + echo "No argument uid (1 of 3)" + exit 1 +fi + +if [ -z "$2" ] + then + echo "No argument email (2 of 3)" + exit 1 +fi + +if [ -z "$3" ] + then + echo "No argument password (3 of 3)" + exit 1 +fi + +curl --location --request POST 'http://{ingress_address}/api/v1/registration' \ + --header 'Content-Type: application/x-www-form-urlencoded' \ + --data-urlencode uid=""$1"" \ + --data-urlencode email=""$2"" \ + --data-urlencode password=""$3"" +echo ""