*/
public function changeSort(Request $request, string $id, string $type)
{
- $validSortTypes = ['books', 'bookshelves'];
+ $validSortTypes = ['books', 'bookshelves', 'shelf_books'];
if (!in_array($type, $validSortTypes)) {
return redirect()->back(500);
}
$this->checkPermissionOrCurrentUser('users-manage', $userId);
$sort = $request->get('sort');
- if (!in_array($sort, ['name', 'created_at', 'updated_at'])) {
+ if (!in_array($sort, ['name', 'created_at', 'updated_at', 'default'])) {
$sort = 'name';
}