first attempt at writing the checkFirstRun() in DefaultBoardService.php

Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
This commit is contained in:
Ryan Fletcher
2018-07-10 21:16:24 -04:00
parent 683354da9d
commit a36dfcc144
2 changed files with 19 additions and 15 deletions

View File

@@ -57,14 +57,11 @@ class PageController extends Controller {
'user' => $this->userId,
'maxUploadSize' => \OCP\Util::uploadLimit(),
];
// run the checkFirstRun() method from OCA\Deck\Service\DefaultBoardService here
// if the board is not created, then run createDefaultBoard() from the defaultBoardService here.
if ($this->defaultBoardService->checkFirstRun($this->userId)) {
if ($this->defaultBoardService->checkFirstRun($this->userId, $AppName)) {
$this->defaultBoardService->createDefaultBoard('Personal', $this->userId, '000000');
}
return new TemplateResponse('deck', 'main', $params);
}