fix /api/preview

This commit is contained in:
purerosefallen 2020-05-06 21:05:55 +08:00
parent 09c1ba2b0a
commit 61dc667705
No known key found for this signature in database
GPG Key ID: E6D78C90943A3185

1
app.py
View File

@ -343,6 +343,7 @@ def route_api_preview():
if not song_id or not re.match('^[0-9]+$', song_id):
abort(400)
song_id = int(song_id)
song = db.songs.find_one({'id': song_id})
if not song:
abort(400)