mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 16:24:29 +00:00
Update SearchApiV2Service
This commit is contained in:
parent
efa8b35877
commit
1dac65fc10
1 changed files with 4 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue