Skip to content

Commit

Permalink
Fix api (LeavesMC#80)
Browse files Browse the repository at this point in the history
Co-authored-by: MC_XiaoHei <[email protected]>
  • Loading branch information
2 people authored and Lumine1909 committed Sep 15, 2024
1 parent 383a279 commit 25395dc
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 25395dc

Please sign in to comment.