diff --git a/sh/tests/solutions/to-git-or-not-to-git.sh b/sh/tests/solutions/to-git-or-not-to-git.sh index 568d211f4..2d1ead79e 100755 --- a/sh/tests/solutions/to-git-or-not-to-git.sh +++ b/sh/tests/solutions/to-git-or-not-to-git.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -curl -s "https://$DOMAIN/api/graphql-engine/v1/graphql" --data '{"query":"{user(where:{login:{_eq:\"'$USERNAME'\"}}){id}}"}' | jq '.data.user[0].id' +curl -s "https://$DOMAIN/assets/superhero/all.json" | jq -r '.[] | select(.id==170) | "\(.name)\n\(.powerstats.power)\n\(.appearance.gender)"' diff --git a/subjects/to-git-or-not-to-git/README.md b/subjects/to-git-or-not-to-git/README.md index eb0a9002a..466d803c9 100644 --- a/subjects/to-git-or-not-to-git/README.md +++ b/subjects/to-git-or-not-to-git/README.md @@ -1,21 +1,17 @@ -## to-git-or-not-to-git-? +## to-git-or-not-to-git ### Instructions -Write in a file `to-git-or-not-to-git.sh` the command that isolates your Gitea `id`. +Write in a file `to-git-or-not-to-git.sh` the command that will show the `name`, `power` and `gender` of the superhero with the `id: 170`. -Only the numbers will appear. +- Where to look : [superhero]() -Here is the base command that needs to be adapted with your username and more : - -``` -curl -s https://((DOMAIN))/api/graphql-engine/v1/graphql --data '{"query":"{user(where:{login:{_eq:\"choumi\"}}){id}}"}' -``` - -### Usage +The output should be exactly like the example below: ```console $ bash to-git-or-not-to-git.sh -231748 +Chameleon +28 +Male $ ```