aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BartService.cs9
1 files 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<PagerContext>();
@@ -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) {