fix(UrlShortner): wrong array filter
This commit is contained in:
parent
f8eddfd1d5
commit
dcdb1b23d7
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ if (strpos($_SERVER['REQUEST_URI'], '/admin') === 0) {
|
|||
http_response_code(400);
|
||||
exit();
|
||||
}
|
||||
$urls = array_filter([], fn ($u) => $u['slug'] !== $_GET['slug']);
|
||||
$urls = array_filter($urls, fn ($u) => $u['slug'] !== $_GET['slug']);
|
||||
echo "The urls with this slug were deleted";
|
||||
|
||||
saveUrls($urls);
|
||||
|
|
Loading…
Reference in a new issue