Skip to content

Commit

Permalink
chore(cspp): Clean up shell-helpers
Browse files Browse the repository at this point in the history
Remove redundant scripts and clean up the ones left to allow for a development
or production URI easily.
  • Loading branch information
Michael Stahnke committed Sep 17, 2024
1 parent 4f7fb4b commit 7c84371
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
9 changes: 9 additions & 0 deletions cspp/shell-helpers/api_key_revoke.sh
Original file line number Diff line number Diff line change
@@ -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

12 changes: 8 additions & 4 deletions cspp/shell-helpers/upload.sh → cspp/shell-helpers/post.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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 <image file> <caption>"
exit 1
Expand All @@ -16,6 +21,5 @@ curl -X POST \
-F "image=@$file" \
-F "caption=$caption" \
-H "X-API-KEY: $API_KEY" \
http://localhost:7171/upload

$URI

8 changes: 0 additions & 8 deletions cspp/shell-helpers/revoke.sh

This file was deleted.

0 comments on commit 7c84371

Please sign in to comment.