Skip to content

Commit

Permalink
Update update_annexe.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinPeutin authored Sep 23, 2024
1 parent ee28c68 commit a75df9b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions update_annexes/update_annexe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,20 @@ do
echo $id_annexe
if [[ "$id_annexe" == "null" ]]
then
curl --request POST \
new_annexe=curl --request POST \
--url https://data.geopf.fr/api/datastores/2d4dd9f5-ce16-4e7f-81d5-7e392209b7ff/annexes \
--header "Authorization: Bearer $token" \
--header 'content-type: multipart/form-data' \
--form file=@dist/$dossier/$fichier \
--form paths=/$dossier/$fichier

id_annexe=`echo $new_annexe | jq '_id' | cut -d'"' -f2`

curl --request PATCH \
--url https://data.geopf.fr/api/datastores/2d4dd9f5-ce16-4e7f-81d5-7e392209b7ff/annexes \
--url https://data.geopf.fr/api/datastores/2d4dd9f5-ce16-4e7f-81d5-7e392209b7ff/annexes/$id_annexe \
--header "Authorization: Bearer $token" \
--header 'content-type: application/json' \
--data '{"published": true,}'
--data '{"published": true}'

else

Expand Down

0 comments on commit a75df9b

Please sign in to comment.