From 6fe1bcf2b2b1418f24a89ee4e888175fd0d9454c Mon Sep 17 00:00:00 2001 From: miguel Date: Tue, 16 May 2023 16:10:48 +0100 Subject: [PATCH] fix(to-git-or-not-to-git-remake): changed the exercise so that it is doable --- sh/tests/solutions/to-git-or-not-to-git.sh | 2 +- subjects/to-git-or-not-to-git/README.md | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) 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 568d211f..2d1ead79 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 eb0a9002..466d803c 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 $ ```