from fastapi import APIRouter, Depends
from sqlalchemy.orm import Session
from app.common.database import get_db
from app.common.models import User
from app.repositories.notifications_repo import NotificationsRepo
from app.utils.response import Response
from typing import Dict

router = APIRouter()

@router.patch("/notifications/{notification_id}/read")
async def read_notification(notification_id: int, 
                            db:Session = Depends(get_db),
                            ):
    """
    Read a single notification
    """
    notifications_repo = NotificationsRepo(db)
    notification = notifications_repo.read_single_notification(notification_id)
    return Response.put(name="Notification")