This commit is contained in:
eson
2023-07-17 19:43:43 +08:00
parent 73ce1e6db3
commit 4d9f14eb30
13 changed files with 398 additions and 39 deletions

View File

@@ -10,10 +10,10 @@ info (
import "basic.api"
service home-user-auth {
@handler UserRegisterHandler
post /api/user/register(RequestUserRegister) returns (response);
// @handler UserRegisterHandler
// post /api/user/register(RequestUserRegister) returns (response);
@handler UserLoginHandler
post /api/user/login(RequestUserLogin) returns (response);
@@ -49,6 +49,31 @@ service home-user-auth {
@handler UserOderDeleteHandler
post /api/user/order-delete(RequestOrderId) returns (response);
@handler UserGoogleLoginHandler
post /api/user/oauth2/login/google(RequestGoogleLogin) returns (response);
@handler UserOAuth2LoginHandler
post /api/user/oauth2/login(RequestOAuth) returns (response);
}
type RequestGoogleLogin {
ID string `json:"id,,optional"`
Email string `json:"email,,optional"`
VerifiedEmail bool `json:"verified_email,,optional"`
Name string `json:"name,,optional"`
GivenName string `json:"given_name,,optional"`
FamilyName string `json:"family_name,,optional"`
Link string `json:"link,,optional"`
Picture string `json:"picture,,optional"`
Gender string `json:"gender,,optional"`
Locale string `json:"locale,,optional"`
}
type RequestOAuth {
Platform string `json:"platform"`
Code string `json:"code"`
}
type RequestContactService {