account
register
params
'username', 'password', 'email'
return
- code=303, error='用户名/密码/邮箱不能为空'
- code=301, error='用户名已存在'
- code=302, error='邮箱已存在'
- code=500, error=str(e)
- code=200
login
params
'username', 'password'
return
- code=303, error='用户名或密码错误'
- code=200, token=token
logout
params
'username', 'token'
return
- code=401, error='未登录'
- code=200
send_email_verification_code
params
'username', 'email'
return
- code=302, error='用户不存在'
- code=301, error='邮箱错误'
- code=500, error='验证码发送失败'
check_token
params
'username', 'token'
return
- code=302, error='用户不存在'
- code=303, error='验证码无效'
- code=200
reset_password
params
'username', 'password', 'token'
return
- code=302, error='用户不存在'
- code=303, error='验证码无效'