Expose ETag on single object get methods

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-11-10 16:01:20 +01:00
parent 082b7c1983
commit 8b7a30ce4f
6 changed files with 21 additions and 3 deletions
+3 -1
View File
@@ -64,7 +64,9 @@ class CardApiController extends ApiController {
*/
public function get() {
$card = $this->cardService->find($this->request->getParam('cardId'));
return new DataResponse($card, HTTP::STATUS_OK);
$response = new DataResponse($card, HTTP::STATUS_OK);
$response->setETag($card->getEtag());
return $response;
}
/**