diff options
Diffstat (limited to 'classes/Handler/GetpaginationHandler.php')
| -rw-r--r-- | classes/Handler/GetpaginationHandler.php | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/classes/Handler/GetpaginationHandler.php b/classes/Handler/GetpaginationHandler.php deleted file mode 100644 index 282c724..0000000 --- a/classes/Handler/GetpaginationHandler.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -namespace Handler; - -use AuthRequired; -use ORM; -use Request; -use RequestHandlerInterface; -use Response; - -class GetpaginationHandler implements RequestHandlerInterface, AuthRequired -{ - public function handle(Request $request): Response - { - $bookid = (int) $request->getAttribute('id'); - - if ($bookid) { - $pag = ORM::for_table('epube_pagination') - ->where('bookid', $bookid) - ->find_one(); - - if ($pag) { - return (new Response())->withBody($pag->pagination); - } - } - - return (new Response()) - ->withStatus(404) - ->withBody("File not found."); - } -} |
