mirror of
https://github.com/NohamR/AM-Exporter.git
synced 2026-05-25 04:07:11 +00:00
16 lines
383 B
Python
16 lines
383 B
Python
from flask import Flask, request, jsonify
|
|
|
|
app = Flask(__name__)
|
|
|
|
@app.route('/music/set', methods=['POST'])
|
|
def set_content():
|
|
global cache
|
|
cache = request.get_json()
|
|
return jsonify({'message': 'Content set successfully'})
|
|
|
|
@app.route('/music/display', methods=['GET'])
|
|
def display_content():
|
|
return jsonify(cache)
|
|
|
|
if __name__ == '__main__':
|
|
app.run(debug=True) |