Add an ETag for the search providers

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-09-15 09:19:53 +02:00
parent 8e22c90946
commit a8d9b22beb
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 4 additions and 3 deletions

View File

@ -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;
}
/**