Skip to content

Commit 2a40f05

Browse files
committed
dix get post in post lock functions
1 parent ace4450 commit 2a40f05

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Ushahidi/Modules/V5/Http/Controllers/PostController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,7 @@ public function showPostGeoJson($id, Request $request): PostGeometryResource
479479

480480
public function updateLock(int $post_id, Request $request)
481481
{
482-
483-
$post = $this->queryBus->handle(new FindPostByIdQuery($post_id, ['id', 'user_id', 'form_id']));
482+
$post = $this->getPost($post_id, ['id', 'status','user_id','form_id'], []);
484483
$this->authorize('update', $post);
485484

486485
$this->commandBus->handle(new UpdatePostLockCommand($post_id));
@@ -491,7 +490,7 @@ public function updateLock(int $post_id, Request $request)
491490

492491
public function deleteLock(int $post_id, Request $request)
493492
{
494-
$post = $this->queryBus->handle(new FindPostByIdQuery($post_id, ['id', 'user_id', 'form_id']));
493+
$post = $this->getPost($post_id, ['id', 'status','user_id','form_id'], []);
495494
$this->authorize('update', $post);
496495

497496
$this->commandBus->handle(new DeletePostLockCommand($post_id));

0 commit comments

Comments
 (0)