Skip to content
Snippets Groups Projects
Verified Commit 219dcbcb authored by Guillaume Damiens's avatar Guillaume Damiens
Browse files

ajout boucle sur les boards + recup date de dernière modif

parent 6cc83675
No related branches found
No related tags found
1 merge request!37Tx services p19 test
......@@ -7,6 +7,24 @@ queryPica=$(curl -s https://wekan.test.picasoft.net/users/login -d 'username='"$
token=$(echo $queryPica | jq -r .token)
expirationDate=$(echo $queryPica | jq -r .tokenExpires)
curl -X GET https://wekan.test.picasoft.net/api/boards \
# récupération des ids de tous les boards publics
idBoards=$(curl -s -X GET https://wekan.test.picasoft.net/api/boards \
-H 'Accept: application/json' \
-H 'Authorization: Bearer '"$token"''
-H 'Authorization: Bearer '"$token"'' | jq -r '.[]._id')
# affiche la dernière date de modification de tous les boards publics
for idBoard in $idBoards
do
board=$(curl -s -X GET https://wekan.test.picasoft.net/api/boards/$idBoard \
-H 'Accept: application/json' \
-H 'Authorization: Bearer '"$token"'')
lastModificationDate=$(echo $board | jq -r '.modifiedAt')
creationDate=$(echo $board | jq -r '.createdAt')
if [ $lastModificationDate = null ]
then
echo "Board" $idBoard ":" $creationDate
else
echo "Board" $idBoard ":" $lastModificationDate
fi
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment