mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update DomainBlockController, purge domainBlocks cache
This commit is contained in:
parent
6d55cb27ee
commit
6d81214138
1 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,7 @@ use Illuminate\Http\Request;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\UserDomainBlock;
|
use App\Models\UserDomainBlock;
|
||||||
use App\Util\ActivityPub\Helpers;
|
use App\Util\ActivityPub\Helpers;
|
||||||
|
use App\Services\UserFilterService;
|
||||||
use Illuminate\Bus\Batch;
|
use Illuminate\Bus\Batch;
|
||||||
use Illuminate\Support\Facades\Bus;
|
use Illuminate\Support\Facades\Bus;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
@ -90,6 +91,7 @@ class DomainBlockController extends Controller
|
||||||
])->allowFailures()->onQueue('feed')->dispatch();
|
])->allowFailures()->onQueue('feed')->dispatch();
|
||||||
|
|
||||||
Cache::forget('profile:following:' . $pid);
|
Cache::forget('profile:following:' . $pid);
|
||||||
|
UserFilterService::domainBlocks($pid, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->json([]);
|
return $this->json([]);
|
||||||
|
@ -109,6 +111,8 @@ class DomainBlockController extends Controller
|
||||||
|
|
||||||
$filters = UserDomainBlock::whereProfileId($pid)->whereDomain($domain)->delete();
|
$filters = UserDomainBlock::whereProfileId($pid)->whereDomain($domain)->delete();
|
||||||
|
|
||||||
|
UserFilterService::domainBlocks($pid, true);
|
||||||
|
|
||||||
return $this->json([]);
|
return $this->json([]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue