Skip to content

Commit

Permalink
Merge pull request #75 from stahnma/cspp-updates
Browse files Browse the repository at this point in the history
Clean up CSPP with a new .flox and fix shell helpers dir
  • Loading branch information
stahnma authored Sep 17, 2024
2 parents 90acb6d + 7c84371 commit 29a7720
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 29a7720

Please sign in to comment.