aboutsummaryrefslogtreecommitdiff
path: root/BartService.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2024-10-28 17:11:00 +1100
committerJake Mannens <jake@asger.xyz>2024-11-01 16:23:35 +1100
commit025414543af498c02582ab4b1fb77cf86f670704 (patch)
tree0f48fe415c106b8520416455b4ca09ec612b8fc1 /BartService.cs
parentea9c7d3867d34ee5b4f5cfa981448c37000f61d6 (diff)
Separate out brigade group ID
Diffstat (limited to 'BartService.cs')
-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) {