Skip to content

Commit e3444b9

Browse files
authored
Merge pull request #448 from nofrixion/feature/MOOV-3842-Create-webhook-fix
Use WebhookCreate validate method
2 parents 8ca73ae + b1cab41 commit e3444b9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/NoFrixion.MoneyMoov/Models/WebHook/WebhookCreate.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ public IEnumerable<ValidationResult> Validate(ValidationContext validationContex
4747
{
4848
yield return new ValidationResult($"The Secret string was too long. The Secret maximum length is {SECRET_MAX_LENGTH} characters.");
4949
}
50+
51+
if (Type == WebhookResourceTypesEnum.None)
52+
{
53+
yield return new ValidationResult("Can not create webhook with type none.");
54+
}
5055
}
5156

5257
public Dictionary<string, string> ToDictionary()

0 commit comments

Comments
 (0)