mirror of
https://github.com/aculix/ticket-monitoring.git
synced 2026-10-27 15:25:53 +00:00
feat: status endpoint reports what each site is actually watching
Adds a 'watching' block with the movie id, variant, venue and format filter per provider. A wrong id or an unexpectedly narrow filter was previously impossible to tell apart from 'nothing on sale yet', since both just report closed.
This commit is contained in:
1 parent
67e97f5a6a
commit
6607a469a2
1 file changed
+8
-1
+8
-1
@@ -158,7 +158,14 @@ function startStatusServer(cfg) {
|
||||
const out = {
|
||||
now: ts(),
|
||||
targetDate: cfg.targetDate,
|
||||
providers: cfg.providers.map((p) => p.key),
|
||||
// What each site is actually watching. Without this, a misconfigured id or an
|
||||
// unexpectedly narrow filter is indistinguishable from "nothing on sale yet".
|
||||
watching: Object.fromEntries(cfg.providers.map((p) => [p.key, {
|
||||
movie: p.contentId ?? p.eventCode,
|
||||
variant: p.movieCode || p.language || "(any language/format variant)",
|
||||
venue: p.venueId || "(any venue)",
|
||||
format: [p.formatTag, p.formatMatch].filter(Boolean).join(" or ") || "(any format)",
|
||||
}])),
|
||||
proxied: Boolean(cfg.dispatcher),
|
||||
retired: state.retired,
|
||||
lastTick,
|
||||
|
||||
Reference in new issue
Block a user