From 5c5b526cea00d21220b59b6f83e79fce48dabe6d Mon Sep 17 00:00:00 2001 From: Eric Rosas Date: Mon, 11 Mar 2024 12:48:23 -0600 Subject: [PATCH] Changed query param to POST for export Changed query param to POST for export --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2d8c333..b561374 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,11 @@ db-list: cd db && docker exec --workdir / investigations-api-postgres-1 psql -U craft -c "SELECT (pg_stat_file('base/'||oid ||'/PG_VERSION')).modification, datname FROM pg_database;" cloud-db-list: - curl https://us-central1-edc-prod-eef0.cloudfunctions.net/sql-helper/databases\?action\=list\&project\=investigations + curl https://us-central1-edc-prod-eef0.cloudfunctions.net/sql-helper/databases\?project\=investigations # Requires argument `dbname` to specify the name of the DB to be exported, usage: `make cloud-db-export dbname=prod_db` cloud-db-export: - curl https://us-central1-edc-prod-eef0.cloudfunctions.net/sql-helper/databases\?action\=export\&database\=$(dbname)\&project\=investigations \ No newline at end of file + curl --header "Content-Type: application/json" \ + --request POST \ + --data '{"project":"investigations"}' \ + https://us-central1-edc-prod-eef0.cloudfunctions.net/sql-helper/databases\?action\=export\&database\=$(dbname) \ No newline at end of file