File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ if ! command -v jq >/dev/null; then
88fi
99
1010function get_token {
11- local token =$( curl --retry 5 -X POST -H " Content-Type: application/json" -d ' {"email": "' " $ADMIN_EMAIL " ' ", "password": "' " $ADMIN_PASSWORD " ' "}' $DIRECTUS_URL /auth/login | jq -r ' .data.access_token ' )
11+ local response =$( curl --retry 5 -X POST -H " Content-Type: application/json" -d ' {"email": "' " $ADMIN_EMAIL " ' ", "password": "' " $ADMIN_PASSWORD " ' "}' $DIRECTUS_URL /auth/login)
1212 echo " $token "
1313}
1414
3131
3232npx wait-on -t 30s -l " $DIRECTUS_URL /admin/login"
3333
34- token=$( get_token)
34+ response=$( get_token)
35+ echo " get_token response: $response "
36+
37+ token=$( echo " $response " | jq -r ' .data.access_token' )
38+ echo " get_token token: $token "
3539
3640if [ -z " $token " ] || [ " $token " == " null" ]; then
3741 echo " Error: Obtained token is empty: '$token '. Please check ADMIN_EMAIL and ADMIN_PASSWORD values in .env file."
You can’t perform that action at this time.
0 commit comments