Update AccountService, add blocksDomain method

This commit is contained in:
Daniel Supernault 2023-12-18 22:32:48 -07:00
parent 7016d19520
commit e7c08fbbb2
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -7,6 +7,7 @@ use App\Profile;
use App\Status;
use App\User;
use App\UserSetting;
use App\Models\UserDomainBlock;
use App\Transformer\Api\AccountTransformer;
use League\Fractal;
use League\Fractal\Serializer\ArraySerializer;
@ -234,4 +235,13 @@ class AccountService
}
return;
}
public static function blocksDomain($pid, $domain = false)
{
if(!$domain) {
return;
}
return UserDomainBlock::whereProfileId($pid)->whereDomain($domain)->exists();
}
}