From a8e24b10c6f8cc58dea7fd6db4e7a9f95bdd42e3 Mon Sep 17 00:00:00 2001 From: Manav Date: Fri, 10 Feb 2023 17:23:19 +0530 Subject: [PATCH] Remove deprecated search API --- src/services/searchService.ts | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/src/services/searchService.ts b/src/services/searchService.ts index b5e899789..d3515ae76 100644 --- a/src/services/searchService.ts +++ b/src/services/searchService.ts @@ -1,14 +1,10 @@ import * as chrono from 'chrono-node'; -import { getEndpoint } from 'utils/common/apiUtil'; -import { getToken } from 'utils/common/key'; -import HTTPService from './HTTPService'; import { getAllPeople } from 'utils/machineLearning'; import constants from 'utils/strings/constants'; import mlIDbStorage from 'utils/storage/mlIDbStorage'; import { getMLSyncConfig } from 'utils/machineLearning/config'; import { Collection } from 'types/collection'; import { EnteFile } from 'types/file'; - import { logError } from 'utils/sentry'; import { Bbox, @@ -26,8 +22,7 @@ import { Person, Thing } from 'types/machineLearning'; import { getUniqueFiles } from 'utils/file'; import { User } from 'types/user'; import { getData, LS_KEYS } from 'utils/storage/localStorage'; - -const ENDPOINT = getEndpoint(); +import { addLogLine } from 'utils/logging'; const DIGITS = new Set(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']); @@ -294,23 +289,10 @@ function parseHumanDate(humanDate: string): DateValue[] { } async function searchLocation( + // eslint-disable-next-line @typescript-eslint/no-unused-vars searchPhrase: string ): Promise { - try { - const resp = await HTTPService.get( - `${ENDPOINT}/search/location`, - { - query: searchPhrase, - limit: 4, - }, - { - 'X-Auth-Token': getToken(), - } - ); - return resp.data.results ?? []; - } catch (e) { - logError(e, 'location search failed'); - } + addLogLine(`attempting to use unimplemented search API`); return []; }