1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 16:24:29 +00:00

Update SearchApiV2Service

This commit is contained in:
Daniel Supernault 2020-02-07 00:26:45 -07:00
parent efa8b35877
commit 1dac65fc10
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -25,7 +25,7 @@ class SearchApiV2Service
{
$this->query = $query;
if($query->has('resolve') && $query->resolve == true && Helpers::validateUrl($query)) {
if($query->has('resolve') && $query->resolve == true && Helpers::validateUrl(urldecode($query))) {
return [
'accounts' => [
$this->resolve()
@ -39,9 +39,7 @@ class SearchApiV2Service
switch ($query->input('type')) {
case 'accounts':
return [
'accounts' => [
$this->accounts()
],
'accounts' => $this->accounts(),
'hashtags' => [],
'statuses' => []
];
@ -49,9 +47,7 @@ class SearchApiV2Service
case 'hashtags':
return [
'accounts' => [],
'hashtags' => [
$this->hashtags()
],
'hashtags' => $this->hashtags(),
'statuses' => []
];
break;
@ -59,9 +55,7 @@ class SearchApiV2Service
return [
'accounts' => [],
'hashtags' => [],
'statuses' => [
$this->statuses()
]
'statuses' => $this->statuses()
];
break;
}