From 025414543af498c02582ab4b1fb77cf86f670704 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Mon, 28 Oct 2024 17:11:00 +1100 Subject: Separate out brigade group ID --- BartService.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/BartService.cs b/BartService.cs index 5c33d26..c872053 100644 --- a/BartService.cs +++ b/BartService.cs @@ -108,7 +108,7 @@ namespace PagerParser.Bart { fetchTimer.Elapsed += OnFetchTimer; } - public async Task FetchDayAsync(DateOnly day) { + public async Task FetchDayAsync(int groupId, DateOnly day) { using var scope = serviceProvider.CreateScope(); using var db = scope.ServiceProvider.GetRequiredService(); @@ -120,8 +120,8 @@ namespace PagerParser.Bart { LoginToken = loginToken, PermissionLevel = 2, UserQualFilterIds = [], - AvailabilityGroupFilterId = "1366", - GroupId = "1366", + AvailabilityGroupFilterId = groupId.ToString(), + GroupId = groupId.ToString(), Length = 0 }; @@ -228,7 +228,8 @@ namespace PagerParser.Bart { } private async void OnFetchTimer(object? sender, ElapsedEventArgs e) { - await FetchDayAsync(DateOnly.FromDateTime(DateTime.Now)); + // TODO: remove hardcoded group ID + await FetchDayAsync(1366, DateOnly.FromDateTime(DateTime.Now)); } public async Task StartAsync(CancellationToken cancellationToken) { -- cgit v1.3