Skip to content

Commit

Permalink
chore(service): change request->all to request->validated in TaskService
Browse files Browse the repository at this point in the history
  • Loading branch information
alisalehi1380 committed Mar 14, 2024
1 parent 8c213f2 commit e5bc6f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Services/TaskService.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ public function show(Task $task): JsonResponse

public function store(StoreRequest $request): JsonResponse
{
$this->taskRepository->create($request->all());
$this->taskRepository->create($request->validated());
return $this->successResponse([], config('TASK::task.success.store'));
}

public function update(Task $task, StoreRequest $request): JsonResponse
{
if ($this->checkAccess($task)) {
try {
$this->taskRepository->update($task, $request->all());
$this->taskRepository->update($task, $request->validated());
return $this->successResponse([], config('TASK::task.success.update'));
} catch (ModelNotFoundException $e) {
return $this->errorResponse([], config('TASK::task.success.update'), Response::HTTP_NOT_FOUND);
Expand Down

0 comments on commit e5bc6f5

Please sign in to comment.