-
This commit is contained in:
@ -49,7 +49,7 @@ func (s *applicationService) Create(ctx context.Context, req *domain.CreateAppli
|
||||
}
|
||||
|
||||
// Additional business logic validation
|
||||
if req.TokenRenewalDuration > req.MaxTokenDuration {
|
||||
if req.TokenRenewalDuration.Duration > req.MaxTokenDuration.Duration {
|
||||
return nil, fmt.Errorf("token renewal duration cannot be greater than max token duration")
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ func (s *applicationService) Update(ctx context.Context, appID string, updates *
|
||||
|
||||
// Additional business logic validation
|
||||
if updates.TokenRenewalDuration != nil && updates.MaxTokenDuration != nil {
|
||||
if *updates.TokenRenewalDuration > *updates.MaxTokenDuration {
|
||||
if updates.TokenRenewalDuration.Duration > updates.MaxTokenDuration.Duration {
|
||||
return nil, fmt.Errorf("token renewal duration cannot be greater than max token duration")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user