Skip to content

Commit

Permalink
Ref: User link table from guest (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed May 13, 2024
1 parent 8263251 commit 7f8753c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Dashboard/AllUrlController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function view()
*
* @return \Illuminate\Contracts\View\View
*/
public function viewFromGuest()
public function guestLinkView()
{
return view('backend.url-list-of-guest');
}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/backend/url-list.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</span>
</div>
<div class="w-1/2 text-right">
<a href="{{ route('dashboard.allurl-from-guest') }}" title="{{__('Shortened long links by Guest')}}" class="btn btn-secondary">
<a href="{{ route('dashboard.allurl.u-guest') }}" title="{{__('Shortened long links by Guest')}}" class="btn btn-secondary">
{{__('By Guest')}}
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

// All URLs
Route::get('/allurl', [AllUrlController::class, 'view'])->name('dashboard.allurl');
Route::get('/allurl/guest', [AllUrlController::class, 'viewFromGuest'])->name('dashboard.allurl-from-guest');
Route::get('/allurl/delete/{url:keyword}', [AllUrlController::class, 'delete'])->name('dashboard.allurl.su_delete');
Route::get('/allurl/u/guest', [AllUrlController::class, 'guestLinkView'])->name('dashboard.allurl.u-guest');

// User
Route::namespace('User')->prefix('user')->group(function () {
Expand Down
4 changes: 2 additions & 2 deletions tests/Feature/AuthPage/AllUrlsPageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function auAdminCanAccessThisPage(): void
$response->assertOk();

$response = $this->actingAs($this->adminUser())
->get(route('dashboard.allurl-from-guest'));
->get(route('dashboard.allurl.u-guest'));
$response->assertOk();
}

Expand All @@ -31,7 +31,7 @@ public function auNormalUserCantAccessThisPage(): void
$response->assertForbidden();

$response = $this->actingAs($this->normalUser())
->get(route('dashboard.allurl-from-guest'));
->get(route('dashboard.allurl.u-guest'));
$response->assertForbidden();
}

Expand Down

0 comments on commit 7f8753c

Please sign in to comment.