add linter
This commit is contained in:
@@ -48,7 +48,7 @@ class ToDoController extends Controller
|
||||
$data['checked'] = $request->input('checked') ? now() : null;
|
||||
$todo->update($data);
|
||||
|
||||
if ($request->user()->currentTimeTracker->to_do_id === $todo->id) {
|
||||
if ($request->user()->currentTimeTracker?->to_do_id === $todo->id) {
|
||||
$request->user()->stopCurrentTimeTracker();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ class ToDoRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'name' => ['string', 'min:3', 'max:255'],
|
||||
'checked' => ['boolean'],
|
||||
'description' => ['string', 'max:2000'],
|
||||
'checked' => ['boolean', 'nullable'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ class ToDoResource extends JsonResource
|
||||
'id' => $this->id,
|
||||
'user_id' => $this->user_id,
|
||||
'name' => $this->name,
|
||||
'description' => $this->description,
|
||||
'checked' => $this->checked,
|
||||
'duration' => $this->duration,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user