Skip to content

Commit 6e6b0ff

Browse files
committed
wip
1 parent 4e6d5be commit 6e6b0ff

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

app/Services/BlockedStringService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function domainInUse()
5454
$query->orWhere('destination', 'like', '%://'.$domain.'%')
5555
->orWhere('destination', 'like', '%.'.$domain.'%');
5656
}
57-
})->get();
57+
})->orderBy('destination')->get();
5858
}
5959

6060
/**

resources/views/backend/about.blade.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,8 @@ class="underline decoration-dotted">
118118

119119
@if ($domainInUses->isNotEmpty())
120120
<br><br>
121-
<code class="text-red-400 dark:text-orange-600">// Unfortunately the list below is already used </code> <br>
122-
<code class="text-red-400 dark:text-orange-600">// as shortened URL destination</code> <br>
123-
121+
<code class="text-red-400 dark:text-orange-600">// Unfortunately the list below is already used</code>
122+
<br>
124123
@foreach ($domainInUses as $domainInUse)
125124
@php
126125
$domainInUseKey = $domainInUse->keyword;

tests/Unit/Services/BlockedStringServiceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ public function blocked_domainInUse()
6666

6767
config(['urlhub.blacklist_domain' => ['laravel.com', 'github.com']]);
6868

69-
$this->assertEqualsCanonicalizing(
69+
$this->assertEquals(
7070
[
71-
'https://laravel.com',
7271
'https://api.laravel.com/docs/12.x/index.html',
7372
'https://github.com/realodix/urlhub',
73+
'https://laravel.com',
7474
],
7575
$this->blockedService->domainInUse()->pluck('destination')->toArray(),
7676
);

0 commit comments

Comments
 (0)