| Total Complexity | 4 |
| Total Lines | 69 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class SettingController extends Controller { |
||
| 15 | |||
| 16 | /** @var IConfig */ |
||
| 17 | private $config; |
||
| 18 | |||
| 19 | /** @var FaceMapper */ |
||
| 20 | private $faceMapper; |
||
| 21 | |||
| 22 | /** @var ImageMapper */ |
||
| 23 | private $imageMapper; |
||
| 24 | |||
| 25 | /** @var PersonMapper */ |
||
| 26 | private $personMapper; |
||
| 27 | |||
| 28 | /** @var string */ |
||
| 29 | private $userId; |
||
| 30 | |||
| 31 | public function __construct ($appName, |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param $type |
||
| 50 | * @param $value |
||
| 51 | * @return JSONResponse |
||
| 52 | * @throws \OCP\PreConditionNotMetException |
||
| 53 | */ |
||
| 54 | public function setAppValue($type, $value) { |
||
| 55 | $this->config->setAppValue('facerecognition', $type, $value); |
||
| 56 | $result = [ |
||
| 57 | 'success' => 'true', |
||
| 58 | 'value' => $value |
||
| 59 | ]; |
||
| 60 | return new JSONResponse($result); |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @param $type |
||
| 65 | * @return JSONResponse |
||
| 66 | */ |
||
| 67 | public function getAppValue($type) { |
||
| 83 | } |
||
| 84 | |||
| 86 |