From ff45014ca6e4e711c86ef804753352ffb69ac333 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Mon, 31 Jul 2017 22:34:38 -0400 Subject: [PATCH] Add Whitelist API actions Dummy action ones, but real GET /dns/whitelist Signed-off-by: Mcat12 --- src/utils.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/utils.js b/src/utils.js index b0cf755..a1d6190 100644 --- a/src/utils.js +++ b/src/utils.js @@ -76,6 +76,16 @@ export const api = { getHistory() { return this.get("stats/history"); }, + getWhitelist() { + return this.get("dns/whitelist"); + }, + //TODO: Implement whitelisting in FTL API + addWhitelist(domain) { + return new Promise(resolve => setTimeout(() => resolve({ status: "success" }), 1000)); + }, + removeWhitelist(domain) { + return new Promise(resolve => setTimeout(() => resolve({ status: "success" }), 1000)); + }, get(url) { return fetch(this.urlFor(url)).then(data => data.json()); },