Signed-off-by: Morris Jobke <hey@morrisjobke.de>
return new JSONResponse(['error' => $e->getMessage()], Http::STATUS_INTERNAL_SERVER_ERROR);
}
$currentVersion++;
- $this->config->setUserValue($this->userId, 'dashboard', 'backgroundVersion', $currentVersion);
+ $this->config->setUserValue($this->userId, 'dashboard', 'backgroundVersion', (string)$currentVersion);
return new JSONResponse([
'type' => $type,
'value' => $value,
*/
public function setFileBackground($path): void {
$this->config->setUserValue($this->userId, 'dashboard', 'background', 'custom');
+ /** @var \OCP\Files\File $file */
$file = $this->userFolder->get($path);
$this->dashboardUserFolder->newFile('background.jpg', $file->fopen('r'));
}