mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-18 22:31:04 +00:00
Updated user and shelf views to new design
This commit is contained in:
parent
880d4f35da
commit
138f5d5c4f
44 changed files with 719 additions and 597 deletions
app/Http/Controllers
|
@ -289,15 +289,20 @@ class UserController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Change the stored sort type for the books view.
|
||||
* @param $id
|
||||
* Change the stored sort type for a particular view.
|
||||
* @param string $id
|
||||
* @param string $type
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function changeBooksSort($id, Request $request)
|
||||
public function changeSort(string $id, string $type, Request $request)
|
||||
{
|
||||
// TODO - Test this endpoint
|
||||
return $this->changeListSort($id, $request, 'books');
|
||||
$validSortTypes = ['books', 'bookshelves'];
|
||||
if (!in_array($type, $validSortTypes)) {
|
||||
return redirect()->back(500);
|
||||
}
|
||||
return $this->changeListSort($id, $request, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue