mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-29 06:25:18 -04:00
Changes some API things.
This commit is contained in:
parent
811994423d
commit
a60d5556af
13 changed files with 36 additions and 33 deletions
|
@ -19,14 +19,25 @@ normalized_require_once("/server/php/inc/util.php");
|
|||
normalized_require_once("/server/php/inc/App.php");
|
||||
normalized_require_once("/server/php/inc/Entry.php");
|
||||
|
||||
$APP = new App(APP_ABS_PATH, APP_ABS_HREF, ABS_HREF);
|
||||
$app = new App(APP_ABS_PATH, APP_ABS_HREF, ABS_HREF);
|
||||
|
||||
if (array_key_exists("api", $_REQUEST)) {
|
||||
if (count($_REQUEST)) {
|
||||
|
||||
header("Content-type: application/json;h5ai={{pkg.version}}");
|
||||
|
||||
use_request_params("api");
|
||||
normalized_require_once("/server/php/inc/Api.php");
|
||||
$api = new Api($APP);
|
||||
$api = new Api($app);
|
||||
$api->apply();
|
||||
|
||||
json_fail(100, "unsupported request");
|
||||
|
||||
} else {
|
||||
|
||||
header("Content-type: text/html;h5ai={{pkg.version}}");
|
||||
|
||||
$HREF = $app->get_app_abs_href();
|
||||
$JSON = $app->get_generic_json();
|
||||
$FALLBACK = $app->get_no_js_fallback();
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue