revamped authentication system
This commit is contained in:
@@ -14,7 +14,7 @@ from typing import Optional
|
||||
from fastapi import APIRouter, Depends, Query
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app.api.deps import get_current_admin_user
|
||||
from app.api.deps import get_current_admin_api
|
||||
from app.core.database import get_db
|
||||
from models.schema.admin import (
|
||||
AdminNotificationCreate,
|
||||
@@ -42,7 +42,7 @@ def get_notifications(
|
||||
skip: int = Query(0, ge=0),
|
||||
limit: int = Query(50, ge=1, le=100),
|
||||
db: Session = Depends(get_db),
|
||||
current_admin: User = Depends(get_current_admin_user),
|
||||
current_admin: User = Depends(get_current_admin_api),
|
||||
):
|
||||
"""Get admin notifications with filtering."""
|
||||
# TODO: Implement notification service
|
||||
@@ -58,7 +58,7 @@ def get_notifications(
|
||||
@router.get("/unread-count")
|
||||
def get_unread_count(
|
||||
db: Session = Depends(get_db),
|
||||
current_admin: User = Depends(get_current_admin_user),
|
||||
current_admin: User = Depends(get_current_admin_api),
|
||||
):
|
||||
"""Get count of unread notifications."""
|
||||
# TODO: Implement
|
||||
@@ -69,7 +69,7 @@ def get_unread_count(
|
||||
def mark_as_read(
|
||||
notification_id: int,
|
||||
db: Session = Depends(get_db),
|
||||
current_admin: User = Depends(get_current_admin_user),
|
||||
current_admin: User = Depends(get_current_admin_api),
|
||||
):
|
||||
"""Mark notification as read."""
|
||||
# TODO: Implement
|
||||
@@ -79,7 +79,7 @@ def mark_as_read(
|
||||
@router.put("/mark-all-read")
|
||||
def mark_all_as_read(
|
||||
db: Session = Depends(get_db),
|
||||
current_admin: User = Depends(get_current_admin_user),
|
||||
current_admin: User = Depends(get_current_admin_api),
|
||||
):
|
||||
"""Mark all notifications as read."""
|
||||
# TODO: Implement
|
||||
@@ -97,7 +97,7 @@ def get_platform_alerts(
|
||||
skip: int = Query(0, ge=0),
|
||||
limit: int = Query(50, ge=1, le=100),
|
||||
db: Session = Depends(get_db),
|
||||
current_admin: User = Depends(get_current_admin_user),
|
||||
current_admin: User = Depends(get_current_admin_api),
|
||||
):
|
||||
"""Get platform alerts with filtering."""
|
||||
# TODO: Implement alert service
|
||||
@@ -115,7 +115,7 @@ def get_platform_alerts(
|
||||
def create_platform_alert(
|
||||
alert_data: PlatformAlertCreate,
|
||||
db: Session = Depends(get_db),
|
||||
current_admin: User = Depends(get_current_admin_user),
|
||||
current_admin: User = Depends(get_current_admin_api),
|
||||
):
|
||||
"""Create new platform alert (manual)."""
|
||||
# TODO: Implement
|
||||
@@ -128,7 +128,7 @@ def resolve_platform_alert(
|
||||
alert_id: int,
|
||||
resolve_data: PlatformAlertResolve,
|
||||
db: Session = Depends(get_db),
|
||||
current_admin: User = Depends(get_current_admin_user),
|
||||
current_admin: User = Depends(get_current_admin_api),
|
||||
):
|
||||
"""Resolve platform alert."""
|
||||
# TODO: Implement
|
||||
@@ -139,7 +139,7 @@ def resolve_platform_alert(
|
||||
@router.get("/alerts/stats")
|
||||
def get_alert_statistics(
|
||||
db: Session = Depends(get_db),
|
||||
current_admin: User = Depends(get_current_admin_user),
|
||||
current_admin: User = Depends(get_current_admin_api),
|
||||
):
|
||||
"""Get alert statistics for dashboard."""
|
||||
# TODO: Implement
|
||||
|
||||
Reference in New Issue
Block a user