Update StoryComposeController, add StoryIndexService support

pull/6134/head
Daniel Supernault 10 months ago
parent e092917752
commit 6c701b335d
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1

@ -14,6 +14,7 @@ use App\Notification;
use App\Report;
use App\Services\FollowerService;
use App\Services\MediaPathService;
use App\Services\StoryIndexService;
use App\Services\StoryService;
use App\Services\UserRoleService;
use App\Status;
@ -222,6 +223,9 @@ class StoryComposeController extends Controller
$story->can_react = $request->input('can_react');
$story->save();
$index = app(StoryIndexService::class);
$index->indexStory($story);
StoryService::delLatest($story->profile_id);
StoryFanout::dispatch($story)->onQueue('story');
StoryService::addRotateQueue($story->id);
@ -243,6 +247,9 @@ class StoryComposeController extends Controller
$story->active = false;
$story->save();
$index = app(StoryIndexService::class);
$index->removeStory($story->id, $story->profile_id);
StoryDelete::dispatch($story)->onQueue('story');
return [

Loading…
Cancel
Save