summaryrefslogtreecommitdiffstats
path: root/settings/ajax/enableapp.php
blob: b9cf6a13670733a7bb76674a09f51db4a5a1c463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php

// Init owncloud
require_once '../../lib/base.php';
OC_JSON::checkAdminUser();
OCP\JSON::callCheck();
OC_JSON::setContentTypeHeader();

$appid = OC_App::enable($_POST['appid']);
if($appid !== false) {
	OC_JSON::success(array('data' => array('appid' => $appid)));
} else {
	OC_JSON::error();
}