Moved Regex for baseUrl to Globalbase

This commit is contained in:
2023-09-20 13:30:52 +02:00
parent 660f6a1648
commit 7a14583d6a
3 changed files with 7 additions and 4 deletions

View File

@ -13,7 +13,9 @@ public class Gotify : NotificationConnector
[JsonConstructor]
public Gotify(GlobalBase clone, string endpoint, string appToken) : base(clone, NotificationConnectorType.Gotify)
{
this.endpoint = endpoint;
if (!baseUrlRex.IsMatch(endpoint))
throw new ArgumentException("endpoint does not match pattern");
this.endpoint = baseUrlRex.Match(endpoint).Value;;
this.appToken = appToken;
}