Skip to content

Commit 8704e89

Browse files
committed
nits
1 parent 2ff30e2 commit 8704e89

3 files changed

Lines changed: 4 additions & 270 deletions

File tree

app/Events/CommentService.php

Lines changed: 0 additions & 266 deletions
This file was deleted.

app/Http/Controllers/CommentController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ public function store(StoreCommentRequest $request)
4343
'depth' => $comment->depth,
4444
]);
4545

46-
DB::commit();
47-
4846
$this->upvoteService->upvote('comment', $comment->id);
4947

48+
DB::commit();
49+
5050
return response()->json([
5151
'new_comment' => new CommentResource($comment),
5252
'user' => new UserResource(Auth::user()),

app/Http/Controllers/ComputerScienceResourceController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ public function store(StoreResourceRequest $request)
7777
'platforms' => $resource->platforms,
7878
]);
7979

80-
DB::commit();
81-
8280
$this->upvoteService->upvote('resource', $resource->id);
8381

82+
DB::commit();
83+
8484
session()->flash('success', 'Created Resource!');
8585

8686
return response()->json($resource);

0 commit comments

Comments
 (0)