equal
deleted
inserted
replaced
|
1 <?php |
|
2 |
|
3 require_once(realpath(dirname(__FILE__) . "/../resources/config.php")); |
|
4 |
|
5 require_once(LIBRARY_PATH . "/renkanFunctions.php"); |
|
6 |
|
7 if(isset($_REQUEST['renkanId'])) { |
|
8 $renkanId = $_REQUEST['renkanId']; |
|
9 } |
|
10 else { |
|
11 header("HTTP/1.0 400 Bad Request"); |
|
12 echo("Missing 'renkanId' parameter"); |
|
13 return; |
|
14 } |
|
15 |
|
16 |
|
17 if ($_SERVER['REQUEST_METHOD'] === 'PUT' || $_SERVER['REQUEST_METHOD'] === 'POST') { |
|
18 |
|
19 $json = file_get_contents('php://input'); |
|
20 |
|
21 saveRenkan($renkanId, $json); |
|
22 } |
|
23 else { |
|
24 getRenkan($renkanId); |
|
25 } |