Skip to content

Commit

Permalink
增加错误返回的提示信息
Browse files Browse the repository at this point in the history
  • Loading branch information
HisAtri committed Jul 17, 2024
1 parent ba5759f commit c88adc2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
def setTag():
match require_auth(request=request, permission='rw'):
case -1:
logger.error("Unauthorized access: 未经授权的用户请求修改标签")
return render_template_string(webui.error()), 403
case -2:
logger.error("Unauthorized access: 您没有为API设置鉴权功能,为了安全起见,有关本地文件修改的功能无法使用。"
"具体请查看<https://docs.lrc.cx/docs/deploy/auth>以启用API鉴权功能。")
return render_template_string(webui.error()), 421

music_data = request.json
Expand Down

0 comments on commit c88adc2

Please sign in to comment.