mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Fixed page editor back button sometimes going nowhere
Updated the back button to be a proper link instead of a reference to the last viewed URL since it could break if the last page was the current one (On validation for example). Includes test to cover. Also applied some styleCI changes. Fixes #2834
This commit is contained in:
@ -13,8 +13,8 @@ class SearchApiController extends ApiController
|
||||
|
||||
protected $rules = [
|
||||
'all' => [
|
||||
'query' => ['required'],
|
||||
'page' => ['integer', 'min:1'],
|
||||
'query' => ['required'],
|
||||
'page' => ['integer', 'min:1'],
|
||||
'count' => ['integer', 'min:1', 'max:100'],
|
||||
],
|
||||
];
|
||||
@ -58,10 +58,8 @@ class SearchApiController extends ApiController
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'data' => $results['results'],
|
||||
'data' => $results['results'],
|
||||
'total' => $results['total'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user