mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 08:44:02 +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;
|
$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 [
|
return [
|
||||||
'accounts' => [
|
'accounts' => [
|
||||||
$this->resolve()
|
$this->resolve()
|
||||||
|
@ -39,9 +39,7 @@ class SearchApiV2Service
|
||||||
switch ($query->input('type')) {
|
switch ($query->input('type')) {
|
||||||
case 'accounts':
|
case 'accounts':
|
||||||
return [
|
return [
|
||||||
'accounts' => [
|
'accounts' => $this->accounts(),
|
||||||
$this->accounts()
|
|
||||||
],
|
|
||||||
'hashtags' => [],
|
'hashtags' => [],
|
||||||
'statuses' => []
|
'statuses' => []
|
||||||
];
|
];
|
||||||
|
@ -49,9 +47,7 @@ class SearchApiV2Service
|
||||||
case 'hashtags':
|
case 'hashtags':
|
||||||
return [
|
return [
|
||||||
'accounts' => [],
|
'accounts' => [],
|
||||||
'hashtags' => [
|
'hashtags' => $this->hashtags(),
|
||||||
$this->hashtags()
|
|
||||||
],
|
|
||||||
'statuses' => []
|
'statuses' => []
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
|
@ -59,9 +55,7 @@ class SearchApiV2Service
|
||||||
return [
|
return [
|
||||||
'accounts' => [],
|
'accounts' => [],
|
||||||
'hashtags' => [],
|
'hashtags' => [],
|
||||||
'statuses' => [
|
'statuses' => $this->statuses()
|
||||||
$this->statuses()
|
|
||||||
]
|
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue