mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 18:35:13 +00:00
43 lines
658 B
PHP
43 lines
658 B
PHP
<?php
|
|
|
|
namespace Zotlabs\Module;
|
|
|
|
class Oauth2test extends \Zotlabs\Web\Controller {
|
|
|
|
function get() {
|
|
|
|
$o .= replace_macros(get_markup_template('oauth2test.tpl'), array(
|
|
'$baseurl' => z_root(),
|
|
'$endpoints' => array(
|
|
array(
|
|
'oauth2test',
|
|
array(
|
|
array(
|
|
'action', 'create_db'
|
|
)
|
|
),
|
|
'oauth2test_create_db',
|
|
'Create the OAuth2 database tables'
|
|
)
|
|
)
|
|
));
|
|
|
|
return $o;
|
|
}
|
|
|
|
function post() {
|
|
|
|
logger(json_encode($_POST), LOGGER_DEBUG);
|
|
|
|
switch ($_POST['action']) {
|
|
case 'create_db':
|
|
logger('Creating database tables...', LOGGER_DEBUG);
|
|
break;
|
|
|
|
default:
|
|
break;
|
|
}
|
|
|
|
}
|
|
|
|
}
|