This commit is contained in:
Zergling_man 2024-11-03 16:32:44 +11:00
parent 8ab582e450
commit 1cdf83968f
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# Maintainer: Zergling_man, from fedora.email # Maintainer: Zergling_man, from fedora.email
pkgname=swat-codegen pkgname=swat-codegen
pkgver=1.0.3 pkgver=1.0.4
pkgrel=1 pkgrel=1
pkgdesc="A simple CLI interface to RCPDv3, the rank code management service for the game SWAT: Aftermath" pkgdesc="A simple CLI interface to RCPDv3, the rank code management service for the game SWAT: Aftermath"
arch=('any') arch=('any')

View File

@ -31,7 +31,7 @@ function get
function post function post
{ {
TOKE=`get_token` TOKE=`get_token`
curl -H "Authorization:Bearer $TOKE" https://swataftermath.com:9443/account/$1 --json "${*:2}" curl -H "Authorization:Bearer $TOKE" https://swataftermath.com:9443/account/$1 --json "$2"
} }
function delete_code function delete_code
@ -65,7 +65,7 @@ function builds
function save function save
{ {
if [ -n "$2" ]; then name=',"buildName":"'"${*:2}"'"'; fi if [ -n "$2" ]; then name=',"buildName":"'"${*:2}"'"'; fi
post rank-code '{"rankCode":"'$1'"'$name'}' | jq post rank-code '{"rankCode":"'$1'"'"$name"'}' | jq
if [ -z "$2" ]; then delete_code $1; fi # Don't bother storing any build that doesn't have a name. Assume it's just logging the results of a game. if [ -z "$2" ]; then delete_code $1; fi # Don't bother storing any build that doesn't have a name. Assume it's just logging the results of a game.
} }
@ -102,4 +102,4 @@ function generate
} }
# DO SHIT # DO SHIT
$@ "$@"