mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 07:47:53 +00:00
DRY-ify checking URL length for avatars
This commit is contained in:
parent
7f82a3e63a
commit
05f1ee92ea
4 changed files with 4 additions and 12 deletions
|
|
@ -177,8 +177,6 @@ namespace PluralKit.Bot
|
|||
{
|
||||
ctx.CheckOwnGroup(target);
|
||||
|
||||
if (img.Url.Length > Limits.MaxUriLength)
|
||||
throw Errors.InvalidUrl(img.Url);
|
||||
await AvatarUtils.VerifyAvatarOrThrow(img.Url);
|
||||
|
||||
await _db.Execute(c => _repo.UpdateGroup(c, target.Id, new GroupPatch {Icon = img.Url}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue