diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-09 19:44:37 -0500 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-09 19:44:37 -0500 |
| commit | 50d7bacf7be41de23a1fb7b99aa179fb3ed3fd77 (patch) | |
| tree | ab2aff4cf30316577a54f9f862a78061925e283a /src/server/Search.ts | |
| parent | 6a45fd58601a2b03ed234f05b9b0a1b91d25a54d (diff) | |
backup and mail zipped file first passes
Diffstat (limited to 'src/server/Search.ts')
| -rw-r--r-- | src/server/Search.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server/Search.ts b/src/server/Search.ts index 2b59c14b1..21064e520 100644 --- a/src/server/Search.ts +++ b/src/server/Search.ts @@ -1,4 +1,5 @@ import * as rp from 'request-promise'; +import { red } from 'colors'; const pathTo = (relative: string) => `http://localhost:8983/solr/dash/${relative}`; @@ -43,7 +44,7 @@ export namespace Search { export async function clear() { try { - return rp.post(pathTo("update"), { + await rp.post(pathTo("update"), { body: { delete: { query: "*:*" @@ -51,7 +52,10 @@ export namespace Search { }, json: true }); - } catch { } + } catch (e) { + console.log(red("Unable to clear search...")); + console.log(red(e.message)); + } } export async function deleteDocuments(docs: string[]) { |
