Skip to content

Commit

Permalink
ci fixes
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 Aug 10, 2023
1 parent 29f1912 commit 553cf6b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
6 changes: 2 additions & 4 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@
['name' => 'api1#createShare', 'url' => '/api/1/shares', 'verb' => 'POST'],
['name' => 'api1#deleteShare', 'url' => '/api/1/shares/{shareId}', 'verb' => 'DELETE'],
['name' => 'api1#updateSharePermissions', 'url' => '/api/1/shares/{shareId}', 'verb' => 'PUT'],
['name' => 'api1#createTableShare', 'url' => '/api/1/tables/{tableId}/shares', 'verb' => 'POST'],
// -> columns
['name' => 'api1#indexTableColumns', 'url' => '/api/1/tables/{tableId}/columns', 'verb' => 'GET'],
['name' => 'api1#indexViewColumns', 'url' => '/api/1/views/{viewId}/columns', 'verb' => 'GET'],
['name' => 'api1#createColumn', 'url' => '/api/1/columns', 'verb' => 'POST'],
['name' => 'api1#createTableColumn', 'url' => '/api/1/tables/{tableId}/columns', 'verb' => 'POST'],
['name' => 'api1#updateColumn', 'url' => '/api/1/columns/{columnId}', 'verb' => 'PUT'],
['name' => 'api1#getColumn', 'url' => '/api/1/columns/{columnId}', 'verb' => 'GET'],
['name' => 'api1#deleteColumn', 'url' => '/api/1/columns/{columnId}', 'verb' => 'DELETE'],
Expand All @@ -53,10 +55,6 @@
['name' => 'api1#importInTable', 'url' => '/api/1/import/table/{tableId}', 'verb' => 'POST'],
['name' => 'api1#importInView', 'url' => '/api/1/import/views/{viewId}', 'verb' => 'POST'],

// Deprecated API calls
['name' => 'api1#createTableShare', 'url' => '/api/1/tables/{tableId}/shares', 'verb' => 'POST'], // use createShare instead
['name' => 'api1#createTableColumn', 'url' => '/api/1/tables/{tableId}/columns', 'verb' => 'POST'], // Use create column instead


// table
['name' => 'table#index', 'url' => '/table', 'verb' => 'GET'],
Expand Down
17 changes: 8 additions & 9 deletions lib/Controller/Api1Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,8 @@ public function indexViewRows(int $viewId, ?int $limit, ?int $offset): DataRespo
* @CORS
* @NoCSRFRequired
*/
public function createRowInView(
int $viewId,
array $data): DataResponse {
public function createRowInView(int $viewId, string $data): DataResponse {
$data = json_decode($data);
$dataNew = [];
foreach ($data as $key => $value) {
$dataNew[] = [
Expand All @@ -520,9 +519,9 @@ public function createRowInView(
* @CORS
* @NoCSRFRequired
*/
public function createRowInTable(
int $tableId,
array $data): DataResponse {
public function createRowInTable(int $tableId, string $data): DataResponse {
$data = json_decode($data, true);

$dataNew = [];
foreach ($data as $key => $value) {
$dataNew[] = [
Expand Down Expand Up @@ -552,9 +551,9 @@ public function getRow(int $rowId): DataResponse {
* @CORS
* @NoCSRFRequired
*/
public function updateRow(int $rowId,
?int $viewId,
array $data): DataResponse {
public function updateRow(int $rowId, ?int $viewId, string $data): DataResponse {
$data = json_decode($data, true);

$dataNew = [];
foreach ($data as $key => $value) {
$dataNew[] = [
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ public function createRow(TableNode $properties = null): void {
$props[$columnId] = $row[1];
}

print_r($props);

$this->sendRequest(
'POST',
Expand All @@ -666,6 +667,7 @@ public function createRow(TableNode $properties = null): void {
);

$newRow = $this->getDataFromResponse($this->response);
// var_dump($newRow);
$this->rowId = $newRow['id'];

Assert::assertEquals(200, $this->response->getStatusCode());
Expand Down

0 comments on commit 553cf6b

Please sign in to comment.