From 9194cd88e4e8125331bf19b9eef3d67ddb46b002 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sun, 24 Nov 2019 11:10:54 +0000 Subject: [PATCH] new interface for dnsmasq log on APISigned-off-by: Adam Warner Signed-off-by: Adam Warner --- src/types/api.d.ts | 8 ++++++++ src/util/api.tsx | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/types/api.d.ts b/src/types/api.d.ts index f7464a2..4cc24c3 100644 --- a/src/types/api.d.ts +++ b/src/types/api.d.ts @@ -202,3 +202,11 @@ interface ApiClientData { ip: string; count: number; } + +interface ApiLiveLogData { + log: Array<{ + timestamp: number; + message: string; + }>; + nextID: number; +} diff --git a/src/util/api.tsx b/src/util/api.tsx index 6bc5360..6d13b52 100644 --- a/src/util/api.tsx +++ b/src/util/api.tsx @@ -264,6 +264,10 @@ export class ApiClient { ): Promise => { return this.http.put("settings/web", settings); }; + + getLiveLog = (params: any): Promise => { + return this.http.get("ftl/dnsmasq_log?" + paramsToString(params)); + }; } export default new ApiClient(new HttpClient(config));