Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>
  • Loading branch information
Florian Steffens committed Jan 12, 2024
1 parent cd268ef commit 1f8edcf
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions lib/Service/RowService.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ public function findAllByTable(int $tableId, string $userId, ?int $limit = null,
try {
if ($this->permissionsService->canReadRowsByElementId($tableId, 'table', $userId)) {
return $this->row2Mapper->findAll($this->columnMapper->findAllByTable($tableId), $tableId, $limit, $offset, null, null, $userId);

// return $this->mapper->findAllByTable($tableId, $limit, $offset);
} else {
throw new PermissionError('no read access to table id = '.$tableId);
}
Expand Down Expand Up @@ -95,8 +93,6 @@ public function findAllByView(int $viewId, string $userId, ?int $limit = null, ?
$columnsArray = $view->getColumnsArray();
$columns = $this->columnMapper->findAll($columnsArray);
return $this->row2Mapper->findAll($columns, $view->getTableId(), $limit, $offset, $view->getFilterArray(), $view->getSortArray(), $userId);

// return $this->mapper->findAllByView($this->viewMapper->find($viewId), $userId, $limit, $offset);
} else {
throw new PermissionError('no read access to view id = '.$viewId);
}
Expand Down Expand Up @@ -208,16 +204,6 @@ public function create(?int $tableId, ?int $viewId, array $data): Row2 {
$this->logger->error($e->getMessage(), ['exception' => $e]);
throw new InternalError(get_class($this) . ' - ' . __FUNCTION__ . ': '.$e->getMessage());
}

/*$time = new DateTime();
$item = new Row();
$item->setDataArray($data);
$item->setTableId($viewId ? $view->getTableId() : $tableId);
$item->setCreatedBy($this->userId);
$item->setCreatedAt($time->format('Y-m-d H:i:s'));
$item->setLastEditBy($this->userId);
$item->setLastEditAt($time->format('Y-m-d H:i:s'));
return $this->mapper->insert($item);*/
}

/**
Expand Down

0 comments on commit 1f8edcf

Please sign in to comment.