From 083386383ea68d49704c7033032bcfd25a3e6122 Mon Sep 17 00:00:00 2001 From: lana-k Date: Tue, 26 Jan 2021 17:38:19 +0100 Subject: [PATCH] add readFile to fileUtils --- src/fileUtils.js | 4 ++++ src/storedQueries.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fileUtils.js b/src/fileUtils.js index f997da6..357cc18 100644 --- a/src/fileUtils.js +++ b/src/fileUtils.js @@ -39,5 +39,9 @@ export default { uploader.click() }) + }, + + readFile (path) { + return fetch(path) } } diff --git a/src/storedQueries.js b/src/storedQueries.js index e8f9b34..1def683 100644 --- a/src/storedQueries.js +++ b/src/storedQueries.js @@ -92,7 +92,7 @@ export default { }, readPredefinedQueries () { - return fetch('./queries.json') + return fu.readFile('./queries.json') .then(resp => { return resp.json() })