-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.php
26 lines (19 loc) · 826 Bytes
/
test.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
<?php
require_once __DIR__ . '/controllers/ErrorHandler.php';
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: access');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header('Content-Type: application/json; charset=UTF-8');
header('Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With');
require_once __DIR__ . '/database.php';
require_once __DIR__ . '/sendJson.php';
require_once __DIR__ . '/controllers/authHandler.php';
require_once __DIR__ . '/controllers/gironiBetHandler.php';
if($_SERVER['REQUEST_METHOD'] == 'OPTIONS') :
sendJson(200, 'OK');
endif;
//operazioni admin
$authHandler = new AuthHandler();
$gironiBetHandler = new GironiBetHandler();
if ($_SERVER['REQUEST_METHOD'] == 'GET') :
endif;