From 25e4b01c84d5ad85fa0eb0a02035d8c3a69157c1 Mon Sep 17 00:00:00 2001
From: glax <johanna@bernloehr.eu>
Date: Mon, 26 May 2025 04:54:08 +0200
Subject: [PATCH] Fix Interval

---
 API/Api.cs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/API/Api.cs b/API/Api.cs
index ab5c1d8..7e651be 100644
--- a/API/Api.cs
+++ b/API/Api.cs
@@ -1,5 +1,6 @@
 using System.Reflection;
 using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.DependencyInjection.Extensions;
 using Microsoft.OpenApi;
 using SQLiteEF;
 
@@ -49,7 +50,8 @@ public class Api
         app.UseAuthorization();
         
         app.MapControllers();
-        
+
+        _tracker = app.Services.GetRequiredService<Tracker>();
         app.Services.CreateScope().ServiceProvider.GetRequiredService<Context>().Database.Migrate();
 
         app.Run();