fix(bot): validate url in pk;import

This commit is contained in:
spiral 2022-12-06 10:15:20 +00:00
parent ac5774df3d
commit 2fea773d7e
No known key found for this signature in database
GPG key ID: 244A11E4B0BCF40E
4 changed files with 7 additions and 7 deletions

View file

@ -115,7 +115,7 @@ public static class Errors
public static PKError AvatarDimensionsTooLarge(int width, int height) => new(
$"Image too large ({width}x{height} > {Limits.AvatarDimensionLimit}x{Limits.AvatarDimensionLimit}), try resizing the image.");
public static PKError InvalidUrl(string url) => new("The given URL is invalid.");
public static PKError InvalidUrl => new("The given URL is invalid.");
public static PKError UrlTooLong(string url) =>
new($"The given URL is too long ({url.Length}/{Limits.MaxUriLength} characters).");