-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
29 lines (20 loc) · 861 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
require __DIR__ . '/vendor/autoload.php';
use NYPL\Services\Controller\CheckinRequestController;
use NYPL\Services\ServiceContainer;
use NYPL\Services\Swagger;
use NYPL\Starter\Service;
use NYPL\Starter\Config;
use NYPL\Starter\ErrorHandler;
try {
Config::initialize(__DIR__);
$container = new ServiceContainer();
$service = new Service($container);
$service->get('/docs/checkin-requests', Swagger::class);
$service->get('/docs/checkin-requests-sync', Swagger::class);
$service->post('/api/v0.1/checkin-requests', CheckinRequestController::class . ':createCheckinRequest');
$service->post('/api/v0.1/checkin-requests-sync', CheckinRequestController::class . ':createCheckinRequest');
$service->run();
} catch (Exception $exception) {
ErrorHandler::processShutdownError($exception->getMessage(), $exception);
}