mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 07:21:50 +08:00
fix /api/preview
This commit is contained in:
parent
09c1ba2b0a
commit
61dc667705
1
app.py
1
app.py
@ -343,6 +343,7 @@ def route_api_preview():
|
|||||||
if not song_id or not re.match('^[0-9]+$', song_id):
|
if not song_id or not re.match('^[0-9]+$', song_id):
|
||||||
abort(400)
|
abort(400)
|
||||||
|
|
||||||
|
song_id = int(song_id)
|
||||||
song = db.songs.find_one({'id': song_id})
|
song = db.songs.find_one({'id': song_id})
|
||||||
if not song:
|
if not song:
|
||||||
abort(400)
|
abort(400)
|
||||||
|
Loading…
Reference in New Issue
Block a user