diff --git a/cspp/shell-helpers/api_key_revoke.sh b/cspp/shell-helpers/api_key_revoke.sh new file mode 100755 index 0000000..0e3936b --- /dev/null +++ b/cspp/shell-helpers/api_key_revoke.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# Development +URI=http://localhost:7171 +# Produciton +# URI=https://cspp.mandatoryfun.dev/upload + +curl -X DELETE -H "X-API-KEY: $API_KEY" $URI + diff --git a/cspp/shell-helpers/upload.sh b/cspp/shell-helpers/post.sh old mode 100644 new mode 100755 similarity index 57% rename from cspp/shell-helpers/upload.sh rename to cspp/shell-helpers/post.sh index 476be65..7cb84ce --- a/cspp/shell-helpers/upload.sh +++ b/cspp/shell-helpers/post.sh @@ -1,6 +1,11 @@ -#curl -X POST -F "image=@/path/to/your/image.jpg" -F "caption=OptionalCaption" http://localhost:8080/upload +#!/usr/bin/env bash + +# Development +URI=http://localhost:7171 +# Produciton +# URI=https://cspp.mandatoryfun.dev/upload + -#file=`ls ~/Desktop/*.png ~/Desktop/*.jpeg |sort -R |tail -1` if [ -z "$1" ]; then echo "Usage: $0 " exit 1 @@ -16,6 +21,5 @@ curl -X POST \ -F "image=@$file" \ -F "caption=$caption" \ -H "X-API-KEY: $API_KEY" \ -http://localhost:7171/upload - +$URI diff --git a/cspp/shell-helpers/revoke.sh b/cspp/shell-helpers/revoke.sh deleted file mode 100644 index cd1bd29..0000000 --- a/cspp/shell-helpers/revoke.sh +++ /dev/null @@ -1,8 +0,0 @@ -#curl -X POST -F "image=@/path/to/your/image.jpg" -F "caption=OptionalCaption" http://localhost:8080/upload - -#file=`ls ~/Desktop/*.png ~/Desktop/*.jpeg |sort -R |tail -1` -#echo $file - -curl -X DELETE -H "X-API-KEY: $API_KEY" http://localhost:7171/api - -