1
0
mirror of https://github.com/Kovah/LinkAce.git synced 2025-04-21 23:42:10 +02:00

Redirect back to the previous page when deleting links, lists or tags (#341)

This commit is contained in:
Kovah 2022-01-05 23:09:28 +01:00
parent c08b50d4ea
commit 105128ec31
No known key found for this signature in database
GPG Key ID: AAAA031BA9830D7B
7 changed files with 6 additions and 7 deletions

View File

@ -153,7 +153,7 @@ class LinkController extends Controller
}
flash(trans('link.deleted_successfully'), 'warning');
return redirect()->route('links.index');
return redirect()->back();
}
/**

View File

@ -143,6 +143,6 @@ class ListController extends Controller
}
flash(trans('list.deleted_successfully'), 'warning');
return redirect()->route('lists.index');
return redirect()->back();
}
}

View File

@ -86,7 +86,6 @@ class NoteController extends Controller
}
flash(trans('note.deleted_successfully'), 'warning');
return redirect()->route('links.show', [$linkId]);
}
}

View File

@ -144,6 +144,6 @@ class TagController extends Controller
}
flash(trans('tag.deleted_successfully'), 'warning');
return redirect()->route('tags.index');
return redirect()->back();
}
}

View File

@ -367,7 +367,7 @@ class LinkControllerTest extends TestCase
$response = $this->delete('links/1');
$response->assertRedirect('links');
$response->assertRedirect();
$databaseLink = Link::withTrashed()->first();

View File

@ -257,7 +257,7 @@ class ListControllerTest extends TestCase
$response = $this->deleteJson('lists/1');
$response->assertRedirect('lists');
$response->assertRedirect();
$databaseList = LinkList::withTrashed()->first();

View File

@ -239,7 +239,7 @@ class TagControllerTest extends TestCase
$response = $this->delete('tags/1');
$response->assertRedirect('tags');
$response->assertRedirect();
$databaseTag = Tag::withTrashed()->first();