aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Oauth2test.php
blob: 14aa6137a107ff6556542e3dd889c2c77612b628 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?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;
		}
		
	}

}