Added authentication

This commit is contained in:
2025-11-29 14:19:34 +01:00
parent 47f4a22bef
commit 205b69713e
10 changed files with 274 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
from fastapi import APIRouter, HTTPException
from fastapi import APIRouter, HTTPException, Depends
from pymongo import UpdateOne
from database import events_collection
@@ -6,8 +6,9 @@ from graph.audit_logs import fetch_audit_logs
from sources.unified_audit import fetch_unified_audit
from sources.intune_audit import fetch_intune_audit
from models.event_model import normalize_event
from auth import require_auth
router = APIRouter()
router = APIRouter(dependencies=[Depends(require_auth)])
def run_fetch(hours: int = 168):