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

OC_JSON::checkAdminUser();
OCP\JSON::callCheck();

$appid = $_POST['appid'];

$result = OC_Installer::updateApp($appid);
if($result !== false) {
	OC_JSON::success(array('data' => array('appid' => $appid)));
} else {
	$l = OC_L10N::get('settings');	
	OC_JSON::error(array("data" => array( "message" => $l->t("Couldn\'t update app. ") )));
}