feat: Add options route
All checks were successful
Build Docker / BuildImage (push) Successful in 44s

This commit is contained in:
Nathan Woodburn 2024-07-10 17:59:47 +10:00
parent 7e49d23736
commit 860d070c55
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -187,11 +187,11 @@ def actionsJson():
}
]})
@app.route('/api/donate')
@app.route('/api/donate', methods=['GET','OPTIONS'])
def donateAPI():
data = {
"icon": "https://nathan.woodburn.au/assets/img/profile.png",
"label": "1 SOL",
"label": "Donate to Nathan.Woodburn/",
"title": "Donate to Nathan.Woodburn/",
"description": "Student, developer, and crypto enthusiast",
"links": {
@ -227,9 +227,9 @@ def donateAPI():
def donateAmount(amount):
data = {
"icon": "https://nathan.woodburn.au/assets/img/profile.png",
"label": f"{amount} SOL",
"label": f"Donate {amount} SOL to Nathan.Woodburn/",
"title": "Donate to Nathan.Woodburn/",
"description": "Student, developer, and crypto enthusiast"
"description": "Donate {amount} SOL to Nathan.Woodburn/",
}
return jsonify(data)