Skip to content

Commit

Permalink
fixed TTL_MINUTES validation
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmer committed Dec 9, 2024
1 parent 4a9621c commit be601cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/model/tokens/push_token.dart
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ class PushToken extends Token {
Token.ISSUER: const ObjectValidatorNullable<String>(defaultValue: ''),
Token.SERIAL: const ObjectValidator<String>(),
SSL_VERIFY: boolValidator.withDefault(true),
TTL_MINUTES: intValidatorNullable,
TTL_MINUTES: ObjectValidator<Duration>(
transformer: (v) => Duration(minutes: v is int ? v : int.parse(v)),
defaultValue: const Duration(minutes: 10),
),
ENROLLMENT_CREDENTIAL: const ObjectValidatorNullable<String>(),
ROLLOUT_URL: stringToUrivalidator,
Token.IMAGE: stringToUriValidatorNullable,
Expand Down

0 comments on commit be601cc

Please sign in to comment.