aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-09-15 09:19:53 +0200
committerJoas Schilling <coding@schilljs.com>2020-09-15 09:19:53 +0200
commita8d9b22beba9701c5b8b5c8b0f565ada087ec3f9 (patch)
tree339db6c1b70baa7c476ea18371577133c5459d2e /core/Controller
parent8e22c9094623a9167f02f90639be20edc8dc607f (diff)
downloadnextcloud-server-a8d9b22beba9701c5b8b5c8b0f565ada087ec3f9.tar.gz
nextcloud-server-a8d9b22beba9701c5b8b5c8b0f565ada087ec3f9.zip
Add an ETag for the search providers
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/UnifiedSearchController.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/Controller/UnifiedSearchController.php b/core/Controller/UnifiedSearchController.php
index e4593ff4174..c2949ce6095 100644
--- a/core/Controller/UnifiedSearchController.php
+++ b/core/Controller/UnifiedSearchController.php
@@ -72,9 +72,10 @@ class UnifiedSearchController extends OCSController {
public function getProviders(string $from = ''): DataResponse {
[$route, $parameters] = $this->getRouteInformation($from);
- return new DataResponse(
- $this->composer->getProviders($route, $parameters)
- );
+ $result = $this->composer->getProviders($route, $parameters);
+ $response = new DataResponse($result);
+ $response->setETag(md5(json_encode($result)));
+ return $response;
}
/**