mirror of
https://github.com/idanoo/autobrr
synced 2025-07-24 17:29:12 +00:00
Feature: Tail live logs (#27)
* chore: add new yarn.lock * chore: add pkgs * feat: push events via server-sent-events * feat(web): tail live logs * fix: update irc network * fix: set baseurl * fix: headers
This commit is contained in:
parent
11fcf1ead9
commit
09eb0b1716
14 changed files with 213 additions and 26 deletions
|
@ -1,5 +1,5 @@
|
|||
import {Action, DownloadClient, Filter, Indexer, Network} from "../domain/interfaces";
|
||||
import {baseUrl} from "../utils/utils";
|
||||
import {baseUrl, sseBaseUrl} from "../utils/utils";
|
||||
|
||||
function baseClient(endpoint: string, method: string, { body, ...customConfig}: any = {}) {
|
||||
let baseURL = baseUrl()
|
||||
|
@ -106,6 +106,9 @@ const APIClient = {
|
|||
updateNetwork: (network: Network) => appClient.Put(`api/irc/network/${network.id}`, network),
|
||||
deleteNetwork: (id: number) => appClient.Delete(`api/irc/network/${id}`),
|
||||
},
|
||||
events: {
|
||||
logs: () => new EventSource(`${sseBaseUrl()}api/events?stream=logs`, { withCredentials: true })
|
||||
}
|
||||
}
|
||||
|
||||
export default APIClient;
|
Loading…
Add table
Add a link
Reference in a new issue