mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Instead of hardcoding the RPC interface documentation in rpc.php, include the HTML code of the documentation page generated by AsciiDoc. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
17 lines
354 B
PHP
17 lines
354 B
PHP
<?php
|
|
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
|
|
include_once("aurjson.class.php");
|
|
|
|
if ( $_SERVER['REQUEST_METHOD'] != 'GET' ) {
|
|
header('HTTP/1.1 405 Method Not Allowed');
|
|
exit();
|
|
}
|
|
|
|
if ( isset($_GET['type']) ) {
|
|
$rpc_o = new AurJSON();
|
|
echo $rpc_o->handle($_GET);
|
|
}
|
|
else {
|
|
echo file_get_contents('../../doc/rpc.html');
|
|
}
|
|
?>
|