f
This commit is contained in:
@@ -12,7 +12,7 @@ type SubPortalRegisterCommand struct {
|
||||
// CreateInvitationCommand 主账号创建邀请
|
||||
type CreateInvitationCommand struct {
|
||||
ParentUserID string
|
||||
// ExpiresInHours 可选,0 用默认 168 小时
|
||||
// ExpiresInHours 可选,0 或不传为永久有效(100年)
|
||||
ExpiresInHours int `json:"expires_in_hours"`
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,8 @@ func (s *SubordinateApplicationServiceImpl) RegisterSubPortal(ctx context.Contex
|
||||
func (s *SubordinateApplicationServiceImpl) CreateInvitation(ctx context.Context, cmd *commands.CreateInvitationCommand) (*responses.CreateInvitationResponse, error) {
|
||||
hours := cmd.ExpiresInHours
|
||||
if hours <= 0 {
|
||||
hours = 24 * 7
|
||||
// 永久有效:设置100年后过期
|
||||
hours = 24 * 365 * 100
|
||||
}
|
||||
raw, hash, err := GenerateInviteToken()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user