Upgrade to 3.1.0
This commit is contained in:
@@ -62,17 +62,18 @@ return [
|
||||
],
|
||||
[
|
||||
'pattern' => 'site/search',
|
||||
'method' => 'GET',
|
||||
'method' => 'GET|POST',
|
||||
'action' => function () {
|
||||
return $this->site()
|
||||
->index(true)
|
||||
->filterBy('isReadable', true)
|
||||
->search($this->requestQuery('q'), [
|
||||
'score' => [
|
||||
'id' => 64,
|
||||
'title' => 64,
|
||||
]
|
||||
]);
|
||||
$pages = $this
|
||||
->site()
|
||||
->index(true)
|
||||
->filterBy('isReadable', true);
|
||||
|
||||
if ($this->requestMethod() === 'GET') {
|
||||
return $pages->search($this->requestQuery('q'));
|
||||
} else {
|
||||
return $pages->query($this->requestBody());
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
|
Reference in New Issue
Block a user