Skip to content

Commit

Permalink
✨ Remove todo (#4653)
Browse files Browse the repository at this point in the history
- [x] Remove TODO
- [x] Add cache control
  • Loading branch information
damianpumar authored Mar 13, 2024
1 parent c6f8c6e commit 6a706a3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions frontend/v1/infrastructure/repositories/VectorRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ export class VectorRepository {
async getVectors(datasetId: string): Promise<BackendVector[]> {
try {
const { data } = await this.axios.get<Response<BackendVector[]>>(
`/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,
Expand Down

0 comments on commit 6a706a3

Please sign in to comment.