feat: add logic of avatar image uploading
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,51 +1,12 @@
|
||||
from apiflask import Schema
|
||||
from apiflask.fields import Integer, String, Boolean, Nested, List
|
||||
from apiflask.fields import File
|
||||
|
||||
|
||||
class LoginIn(Schema):
|
||||
username = String(required=True)
|
||||
password = String(required=True)
|
||||
tenantId = String(required=True)
|
||||
uuid = String()
|
||||
code = String()
|
||||
class ImageIn(Schema):
|
||||
image = File()
|
||||
|
||||
|
||||
class LoginNestedOut(Schema):
|
||||
token = String()
|
||||
|
||||
|
||||
class LoginOut(Schema):
|
||||
code = Integer()
|
||||
msg = String()
|
||||
data = Nested(LoginNestedOut)
|
||||
|
||||
|
||||
class CaptchaImageNestedOut(Schema):
|
||||
captchaEnabled = Boolean()
|
||||
img = String()
|
||||
uuid = String()
|
||||
|
||||
|
||||
class CaptchaImageOut(Schema):
|
||||
code = Integer()
|
||||
msg = String()
|
||||
data = Nested(CaptchaImageNestedOut)
|
||||
|
||||
|
||||
class TenantOut(Schema):
|
||||
companyName = String()
|
||||
domain = String()
|
||||
tenantId = String()
|
||||
|
||||
|
||||
class TenantsNestedOut(Schema):
|
||||
tenantEnabled = Boolean()
|
||||
voList = List(Nested(TenantOut))
|
||||
|
||||
|
||||
class TenantsOut(Schema):
|
||||
code = Integer()
|
||||
msg = String()
|
||||
data = Nested(TenantsNestedOut)
|
||||
class FileOut(Schema):
|
||||
file = File()
|
||||
|
||||
|
||||
|
@@ -4,11 +4,11 @@ from apiflask.fields import String, URL, Float
|
||||
|
||||
class UserInfoIn(Schema):
|
||||
nickname = String()
|
||||
avatar_url = URL()
|
||||
avatar_id = String()
|
||||
height = Float()
|
||||
|
||||
|
||||
class UserInfoOut(Schema):
|
||||
nickname = String()
|
||||
avatar_url = URL()
|
||||
avatar_id = String()
|
||||
height = Float()
|
Reference in New Issue
Block a user