From 860d070c55443d50d3cb826b8fbc3195056d9f26 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Wed, 10 Jul 2024 17:59:47 +1000 Subject: [PATCH] feat: Add options route --- server.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server.py b/server.py index 8b2986a..d07eae7 100644 --- a/server.py +++ b/server.py @@ -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) @@ -269,7 +269,7 @@ def donateAmountPost(amount): base64_string = base64.b64encode(raw_bytes).decode('utf-8') return jsonify({'message': 'Success', 'transaction': base64_string}) - + # endregion # region Main routes