Fix album delete returning HTML instead of JSON for non-integer IDs
The DELETE /api/library/album/<id> route used <int:album_id> which rejected non-integer IDs (e.g., Navidrome string IDs). Flask returned its default 404 HTML page, causing "unexpected token <" JSON parse error on the frontend. Changed to <album_id> to match all other album routes which already accept any ID type.
This commit is contained in:
parent
a928522b45
commit
f94f043dc6
1 changed files with 1 additions and 1 deletions
|
|
@ -12474,7 +12474,7 @@ def library_delete_track(track_id):
|
|||
return jsonify({"success": False, "error": str(e)}), 500
|
||||
|
||||
|
||||
@app.route('/api/library/album/<int:album_id>', methods=['DELETE'])
|
||||
@app.route('/api/library/album/<album_id>', methods=['DELETE'])
|
||||
def library_delete_album(album_id):
|
||||
"""Delete an album and all its tracks from the database (does NOT delete files on disk)."""
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue