search api update

This commit is contained in:
Čarodej
2022-05-03 16:11:00 +02:00
parent 8b3f76d1d0
commit 89e4ae6737
6 changed files with 22 additions and 20 deletions

View File

@@ -348,7 +348,7 @@ class VisitorBrowseTest extends TestCase
])];
$this->withUnencryptedCookies($cookie)
->get("/api/browse/search/$share->token?query=doc")
->get("/api/search/$share->token?query=doc")
->assertStatus(200)
->assertJsonFragment([
'id' => $file->id,
@@ -357,7 +357,7 @@ class VisitorBrowseTest extends TestCase
// Check public shared item
if (! $is_protected) {
$this->getJson("/api/browse/search/$share->token?query=doc")
$this->getJson("/api/search/$share->token?query=doc")
->assertStatus(200)
->assertJsonFragment([
'id' => $file->id,
@@ -401,14 +401,14 @@ class VisitorBrowseTest extends TestCase
])];
$this->withUnencryptedCookies($cookie)
->get("/api/browse/search/$share->token?query=doc")
->get("/api/search/$share->token?query=doc")
->assertStatus(200)
->assertJsonFragment([]);
}
// Check public shared item
if (! $is_protected) {
$this->getJson("/api/browse/search/$share->token?query=doc")
$this->getJson("/api/search/$share->token?query=doc")
->assertStatus(200)
->assertJsonFragment([]);
}