mirror of
https://github.com/NohamR/AM-Exporter.git
synced 2026-05-25 04:07:11 +00:00
change api endpoint
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
from flask import Flask, request, jsonify
|
||||
from flask_cors import CORS
|
||||
|
||||
app = Flask(__name__)
|
||||
CORS(app, resources={r"/music/*": {"origins": "http://127.0.0.1:5500"}})
|
||||
|
||||
@app.route('/music/set', methods=['POST'])
|
||||
def set_content():
|
||||
@@ -8,7 +10,7 @@ def set_content():
|
||||
cache = request.get_json()
|
||||
return jsonify({'message': 'Content set successfully'})
|
||||
|
||||
@app.route('/music/display', methods=['GET'])
|
||||
@app.route('/music/get', methods=['GET'])
|
||||
def display_content():
|
||||
return jsonify(cache)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user