diff options
author | Joas Schilling <coding@schilljs.com> | 2020-09-15 09:19:53 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-09-15 09:19:53 +0200 |
commit | a8d9b22beba9701c5b8b5c8b0f565ada087ec3f9 (patch) | |
tree | 339db6c1b70baa7c476ea18371577133c5459d2e /core/Controller | |
parent | 8e22c9094623a9167f02f90639be20edc8dc607f (diff) | |
download | nextcloud-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.php | 7 |
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; } /** |