increase test coverage (#117)

70% test coverage
remove socialite
This commit is contained in:
Saeed Vaziry
2024-03-15 22:23:45 +01:00
committed by GitHub
parent 4f12de9586
commit a406491160
62 changed files with 1102 additions and 639 deletions

View File

@ -47,11 +47,14 @@ public function update(Request $request, Project $project): HtmxResponse
public function delete(Project $project): RedirectResponse
{
/** @var User $user */
$user = auth()->user();
/** @var Project $project */
$project = auth()->user()->projects()->findOrFail($project->id);
$project = $user->projects()->findOrFail($project->id);
try {
app(DeleteProject::class)->delete(auth()->user(), $project);
app(DeleteProject::class)->delete($user, $project);
} catch (ValidationException $e) {
Toast::error($e->getMessage());