Skip to content

Commit

Permalink
remove old trashbin endpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Sep 20, 2018
1 parent b4e452a commit a623e09
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 55 deletions.
48 changes: 0 additions & 48 deletions apps/files_trashbin/ajax/list.php

This file was deleted.

2 changes: 0 additions & 2 deletions apps/files_trashbin/appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
->actionInclude('files_trashbin/ajax/delete.php');
$this->create('files_trashbin_ajax_isEmpty', 'ajax/isEmpty.php')
->actionInclude('files_trashbin/ajax/isEmpty.php');
$this->create('files_trashbin_ajax_list', 'ajax/list.php')
->actionInclude('files_trashbin/ajax/list.php');
$this->create('files_trashbin_ajax_undelete', 'ajax/undelete.php')
->actionInclude('files_trashbin/ajax/undelete.php');

14 changes: 9 additions & 5 deletions build/integration/features/bootstrap/Trashbin.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,17 @@ public function emptyTrashbin($user) {
*/
public function listTrashbinFolder($user, $path){
$this->asAn($user);
$params = '?dir=' . rawurlencode('/' . trim($path, '/'));
$this->sendingToWithDirectUrl('GET', '/index.php/apps/files_trashbin/ajax/list.php' . $params, null);
$this->sendingToWithDirectUrl('PROPFIND', "/remote.php/dav/trashbin/$user/$path", null);
$this->theHTTPStatusCodeShouldBe('200');

$response = json_decode($this->response->getBody(), true);

return $response['data']['files'];
$body = $this->response->getBody();
if($body && substr($body, 0, 1) === '<') {
$reader = new Sabre\Xml\Reader();
$reader->xml($body);
return $reader->parse();
} else {
return [];
}
}

/**
Expand Down

0 comments on commit a623e09

Please sign in to comment.