diff options
-rw-r--r-- | include/api_zot.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/api_zot.php b/include/api_zot.php index 287720484..8f621d998 100644 --- a/include/api_zot.php +++ b/include/api_zot.php @@ -1,7 +1,9 @@ <?php function zot_api_init() { - api_register_func('api/red/version','api_zot_version',false); + api_register_func('api/z/1.0/verify','api_verify', true); + + api_register_func('api/red/version','api_zot_version',false); api_register_func('api/z/1.0/version','api_zot_version',false); api_register_func('api/export/basic','api_export_basic', true); api_register_func('api/red/channel/export/basic','api_export_basic', true); @@ -47,6 +49,17 @@ return; } + function api_verify($type) { + if (api_user() === false) { + logger('no channel'); + return false; + } + $channel = channelx_by_n(api_user()); + // logger('channel: ' . print_r($channel,true)); + + json_return_and_die($channel); + } + function api_zot_version($type) { |