fix
This commit is contained in:
parent
7f88233f28
commit
8af873ac42
|
@ -32,7 +32,16 @@ func (m *FsGuestModel) GenerateGuestID(ctx context.Context, AccessSecret uint64)
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
|
||||||
|
uinfo := &FsUserInfo{
|
||||||
|
Module: FsString("module"),
|
||||||
|
UserId: FsInt64(0),
|
||||||
|
GuestId: &record.GuestId,
|
||||||
|
Metadata: FsBytes("{}"),
|
||||||
|
Ctime: &now,
|
||||||
|
Utime: &now,
|
||||||
|
}
|
||||||
|
return tx.Model(FsUserInfo{}).Create(uinfo).Error
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -36,6 +36,11 @@ func FsBool(v bool) *bool {
|
||||||
return &v
|
return &v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func FsBytes(v string) *[]byte {
|
||||||
|
bs := []byte(v)
|
||||||
|
return &bs
|
||||||
|
}
|
||||||
|
|
||||||
// SubscriptionStatus 订阅状态
|
// SubscriptionStatus 订阅状态
|
||||||
type SubscriptionStatus struct {
|
type SubscriptionStatus struct {
|
||||||
NotificationEmail struct {
|
NotificationEmail struct {
|
||||||
|
|
|
@ -48,7 +48,6 @@ func FinishRegister(svcCtx *svc.ServiceContext, user *gmodel.FsUser, token *auth
|
||||||
)
|
)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,21 +10,27 @@ info (
|
||||||
import "basic.api"
|
import "basic.api"
|
||||||
|
|
||||||
service auth {
|
service auth {
|
||||||
|
// 登录接口
|
||||||
@handler UserLoginHandler
|
@handler UserLoginHandler
|
||||||
post /api/auth/login(RequestUserLogin) returns (response);
|
post /api/auth/login(RequestUserLogin) returns (response);
|
||||||
|
|
||||||
|
// 注册
|
||||||
@handler UserRegisterHandler
|
@handler UserRegisterHandler
|
||||||
post /api/auth/register(RequestUserRegister) returns (response);
|
post /api/auth/register(RequestUserRegister) returns (response);
|
||||||
|
|
||||||
|
// 获取cookie, 成为游客
|
||||||
@handler AcceptCookieHandler
|
@handler AcceptCookieHandler
|
||||||
post /api/auth/accept-cookie(request) returns (response);
|
post /api/auth/accept-cookie(request) returns (response);
|
||||||
|
|
||||||
|
// 谷歌第三方登录
|
||||||
@handler UserGoogleLoginHandler
|
@handler UserGoogleLoginHandler
|
||||||
get /api/auth/oauth2/login/google(RequestGoogleLogin) returns (response);
|
get /api/auth/oauth2/login/google(RequestGoogleLogin) returns (response);
|
||||||
|
|
||||||
|
// 邮箱校验
|
||||||
@handler UserEmailConfirmationHandler
|
@handler UserEmailConfirmationHandler
|
||||||
get /api/auth/email/confirmation(RequestEmailConfirmation) returns (response);
|
get /api/auth/email/confirmation(RequestEmailConfirmation) returns (response);
|
||||||
|
|
||||||
|
// 第三方登录,确认使用邮箱
|
||||||
@handler UserEmailRegisterHandler
|
@handler UserEmailRegisterHandler
|
||||||
post /api/auth/oauth2/register(RequestEmailRegister) returns (response);
|
post /api/auth/oauth2/register(RequestEmailRegister) returns (response);
|
||||||
|
|
||||||
|
@ -40,6 +46,7 @@ service auth {
|
||||||
@handler UserResetPasswordHtmlHandler
|
@handler UserResetPasswordHtmlHandler
|
||||||
get /api/auth/reset/password/html(RequestUserResetHtml) returns (response);
|
get /api/auth/reset/password/html(RequestUserResetHtml) returns (response);
|
||||||
|
|
||||||
|
// 用于debug 删除帐号
|
||||||
@handler DebugAuthDeleteHandler
|
@handler DebugAuthDeleteHandler
|
||||||
post /api/auth/debug/delete(RequestAuthDelete) returns (response);
|
post /api/auth/debug/delete(RequestAuthDelete) returns (response);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user