修复json的类型影响

This commit is contained in:
eson
2023-08-24 11:47:22 +08:00
parent 500611236e
commit d8ddad6fe9
18 changed files with 190 additions and 56 deletions

View File

@@ -12,9 +12,9 @@ import "basic.api"
service auth {
@handler UserLoginHandler
post /api/auth/login(RequestUserLogin) returns (response);
@handler UserLoginHandler
post /api/auth/register(RequestUserLogin) returns (response);
@handler UserRegisterHandler
post /api/auth/register(RequestUserRegister) returns (response);
@handler AcceptCookieHandler
post /api/auth/accept-cookie(request) returns (response);
@@ -36,6 +36,7 @@ service auth {
}
type (
// UserAddAddressHandler 用户登录请求结构
RequestUserLogin {
Email string `json:"email"`
@@ -51,14 +52,20 @@ type (
type (
// UserAddAddressHandler 用户登录请求结构
RequestUserRegister {
Email string `json:"email"`
Password string `json:"password"`
Wid string `json:"wid"` // websocket的id
GuestId int64 `json:"guest_id"` // 游客id
FirstName string `json:"first_name"` // 首名
LastName string `json:"last_name"` // 名
Resetaurant string `json:"resetaurant"` // 餐厅类型
Email string `json:"email"` // email
Password string `json:"password"` // 密码
}
// UserLoginHandler 用户登录请求结构
DataUserRegister{
Token string `json:"token"` // 登录jwt token
}
// DataUserRegister{
// Token string `json:"token"` // 登录jwt token
// }
)
type (
@@ -92,9 +99,8 @@ type RequestEmailConfirmation {
}
type RequestEmailRegister {
Email string `json:"email"`
Wid string `json:"wid"`
GuestId uint64 `json:"guest_id"`
Email string `json:"email"`
RegisterToken string `json:"register_token"`
}