[Enhance] Add download error status code

This commit is contained in:
Lost-MSth
2022-10-04 00:28:19 +08:00
parent 8f1c28eb5c
commit 7a614eaa57
2 changed files with 11 additions and 9 deletions

View File

@@ -93,7 +93,7 @@ class UserDownload:
x = self.c.fetchone()
if not x:
raise NoAccess('The token `%s` is not valid.' % self.token)
raise NoAccess('The token `%s` is not valid.' % self.token, status=403)
self.user = User()
self.user.user_id = x[0]
self.token_time = x[1]