summaryrefslogtreecommitdiff
path: root/python/routes.py
diff options
context:
space:
mode:
authornil <nil@tfwhyno.gf>2024-10-02 17:48:56 +0200
committernil <nil@tfwhyno.gf>2024-10-02 17:48:56 +0200
commit0972fa6eab8c9111311f082ba8abfdc6b4a40945 (patch)
tree4eedbdc1a7cfdeee9d651c9871a9f26ab6da56d4 /python/routes.py
parent012c2c03b29a987ca4eead023ded22e01aa7477b (diff)
commit changes
Diffstat (limited to 'python/routes.py')
-rw-r--r--python/routes.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/python/routes.py b/python/routes.py
deleted file mode 100644
index 9567318..0000000
--- a/python/routes.py
+++ /dev/null
@@ -1,33 +0,0 @@
-from flask import Flask, jsonify, request
-import database
-
-
-app = Flask(__name__)
-
-
-def run():
- app.run()
-
-
-@app.route("/", methods=['GET'])
-def hello_world():
- return "not here"
-
-
-@app.route("/song", methods=['GET'])
-def get_song():
- id = request.args.get('id')
- name = request.args.get('name')
- return jsonify(database.get_song(id=id, name=name))
-
-
-@app.route("/songs", methods=['GET'])
-def get_filtered_songs():
- song = request.args.get('song')
- album = request.args.get('album')
- artist = request.args.get('artist')
- return jsonify(
- database.get_filtered_songs(
- song=song, album=album, artist=artist
- )
- )