From 6a706a31ed7d72085dd9fe5b3b33e41703322750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Pumar?= Date: Wed, 13 Mar 2024 16:34:08 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Remove=20todo=20(#4653)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - [x] Remove TODO - [x] Add cache control --- .../v1/infrastructure/repositories/VectorRepository.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/v1/infrastructure/repositories/VectorRepository.ts b/frontend/v1/infrastructure/repositories/VectorRepository.ts index 644545cb1f..e756a7a7d6 100644 --- a/frontend/v1/infrastructure/repositories/VectorRepository.ts +++ b/frontend/v1/infrastructure/repositories/VectorRepository.ts @@ -14,13 +14,11 @@ export class VectorRepository { async getVectors(datasetId: string): Promise { try { const { data } = await this.axios.get>( - `/v1/datasets/${datasetId}/vectors-settings` + `/v1/datasets/${datasetId}/vectors-settings`, + { headers: { "cache-control": "max-age=120" } } ); - return data.items.map((v) => ({ - ...v, - title: v.title ?? v.name, // TODO: Remove when we have titles for vectors - })); + return data.items; } catch (err) { throw { response: VECTOR_API_ERRORS.FETCHING,