10 $app->get(
'/archive[{path:.*}]',
Paperyard\Controllers\Archive\Archive::class);
12 $app->get(
'/doc/{path}', \
Paperyard\Controllers\Archive\Details::class);
14 $app->get(
'/thumbnail/{path}/{page}[/{resolution}]', \
Paperyard\Controllers\Misc\Thumbnail::class);
16 $app->post(
'/setlang',
function (Request $request, Response $response, array $args) {
17 $langCode = $request->getParsedBody()[
'code'];
18 $supportedCodes = array_map(
function ($code) {
return basename($code); }, glob(
"../locale/*", GLOB_ONLYDIR));
19 if (in_array($langCode, $supportedCodes)) {
20 $_SESSION[
"lang-code"] = $langCode;
23 return $response->withStatus(406);
26 $app->post(
'/upload',
Paperyard\Controllers\Misc\Upload::class);
28 include
'confirm.archive.router.php';
30 include
"senders.rules.router.php";
32 include
"recipients.rules.router.php";
34 include
"subjects.rules.router.php";
36 include
"archive.rules.router.php";
38 include
"log.shell.router.php";