mirror of
https://github.com/gosticks/web.git
synced 2026-10-06 22:57:01 +00:00
Add Whitelist API actions
Dummy action ones, but real GET /dns/whitelist Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@@ -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());
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user