mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-08 16:57:26 +08:00
[Enhance] Add limiter & Building API
- Add a custom limiter and use it for limiting users' download instead of using database > So add a requirement `limits`. - Fix a character's value - Change the email max length to 64 - Change something about API's roles and powers - Add an API endpoint for getting users' roles and powers
This commit is contained in:
@@ -76,7 +76,7 @@ class UserRegister(User):
|
||||
|
||||
def set_email(self, email: str):
|
||||
# 邮箱格式懒得多判断
|
||||
if 4 <= len(email) <= 32 and '@' in email and '.' in email:
|
||||
if 4 <= len(email) <= 64 and '@' in email and '.' in email:
|
||||
self.c.execute(
|
||||
'''select exists(select * from user where email = :email)''', {'email': email})
|
||||
if self.c.fetchone() == (0,):
|
||||
|
||||
Reference in New Issue
Block a user