forked from mirror/pixelfed
Update AccountService, add blocksDomain method
This commit is contained in:
parent
7016d19520
commit
e7c08fbbb2
1 changed files with 10 additions and 0 deletions
|
@ -7,6 +7,7 @@ use App\Profile;
|
||||||
use App\Status;
|
use App\Status;
|
||||||
use App\User;
|
use App\User;
|
||||||
use App\UserSetting;
|
use App\UserSetting;
|
||||||
|
use App\Models\UserDomainBlock;
|
||||||
use App\Transformer\Api\AccountTransformer;
|
use App\Transformer\Api\AccountTransformer;
|
||||||
use League\Fractal;
|
use League\Fractal;
|
||||||
use League\Fractal\Serializer\ArraySerializer;
|
use League\Fractal\Serializer\ArraySerializer;
|
||||||
|
@ -234,4 +235,13 @@ class AccountService
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function blocksDomain($pid, $domain = false)
|
||||||
|
{
|
||||||
|
if(!$domain) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return UserDomainBlock::whereProfileId($pid)->whereDomain($domain)->exists();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue