Skip to content

Commit

Permalink
Fix api (#80)
Browse files Browse the repository at this point in the history
Co-authored-by: MC_XiaoHei <[email protected]>
  • Loading branch information
Bluemangoo and MC-XiaoHei authored Jul 30, 2023
1 parent 3a40ec4 commit 0853f0e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions scripts/PushToAPI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,4 @@ changes=$(git log --pretty='%H<<<%s>>>' -"$number" | sed 's/\\n/\\\\n/g')
jar_name="leaves-$mcversion.jar"
jar_sha256=`sha256 $jar_name`

data=$(cat <<EOF
{"project_id":"$project_id","project_name":"$project_name","version":"$mcversion","time":"$ctime","channel":"$channel","promoted":$promoted,"changes":"$changes","downloads":{"application":{"name":"$jar_name","sha256":"$jar_sha256","url":"https://github.com/LeavesMC/Leaves/releases/download/$tag/$jar_name"}},"secret":"$secret"}
EOF
)

curl -X POST -H "Content-Type: application/json" -d $data https://api.leavesmc.top/new_release
curl --location --request POST "https://api.leavesmc.top/new_release" --header "Content-Type: application/json" --data-raw "{'project_id':'$project_id','project_name':'$project_name','version':'$mcversion','time':'$ctime','channel':'$channel','promoted':$promoted,'changes':'$changes','downloads':{'application':{'name':'$jar_name','sha256':'$jar_sha256','url':'https://github.com/LeavesMC/Leaves/releases/download/$tag/$jar_name'}},'secret':'$secret'}"

0 comments on commit 0853f0e

Please sign in to comment.