diff options
author | zotlabs <mike@macgirvin.com> | 2020-07-22 16:23:38 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2020-07-22 16:23:38 -0700 |
commit | 7ae86d29d2474c5e85965c06a4c6a6b7e416b333 (patch) | |
tree | 5de71ec1bfb0b08fae4351062ffe1452121cf728 /include | |
parent | 13ff9a897da05fbd4d82f9bfa758e6f821b833b3 (diff) | |
download | volse-hubzilla-7ae86d29d2474c5e85965c06a4c6a6b7e416b333.tar.gz volse-hubzilla-7ae86d29d2474c5e85965c06a4c6a6b7e416b333.tar.bz2 volse-hubzilla-7ae86d29d2474c5e85965c06a4c6a6b7e416b333.zip |
add api_verify to api_zot
Diffstat (limited to 'include')
-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) { |