Add Whitelist API actions

Dummy action ones, but real GET /dns/whitelist

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2017-07-31 22:34:38 -04:00
parent 0514a7473c
commit ff45014ca6
+10
View File
@@ -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());
},