mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-24 15:48:11 +02:00
Add files via upload
This commit is contained in:
72 files changed
+12339
No files matched your search
@@ -0,0 +1,29 @@
|
||||
from fastapi import APIRouter, Depends
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app import database, schemas
|
||||
from app.services.notification_service import NotificationService
|
||||
|
||||
router = APIRouter(prefix="/notification-profiles", tags=["notifications"])
|
||||
|
||||
|
||||
@router.get("", response_model=list[schemas.NotificationProfileResponse])
|
||||
def get_notification_profiles(db: Session = Depends(database.get_db)):
|
||||
return NotificationService.get_notification_profiles(db)
|
||||
|
||||
|
||||
@router.post("", response_model=schemas.NotificationProfileResponse)
|
||||
def create_notification_profile(profile: schemas.NotificationProfileCreate, db: Session = Depends(database.get_db)):
|
||||
return NotificationService.create_notification_profile(db, profile)
|
||||
|
||||
|
||||
@router.delete("/{profile_id}")
|
||||
def delete_notification_profile(profile_id: int, db: Session = Depends(database.get_db)):
|
||||
return NotificationService.delete_notification_profile(db, profile_id)
|
||||
|
||||
|
||||
@router.put("/{profile_id}", response_model=schemas.NotificationProfileResponse)
|
||||
def update_notification_profile(
|
||||
profile_id: int, profile: schemas.NotificationProfileUpdate, db: Session = Depends(database.get_db)
|
||||
):
|
||||
return NotificationService.update_notification_profile(db, profile_id, profile)
|
||||
Reference in new issue
Block a user