mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
13 lines
287 B
Python
13 lines
287 B
Python
|
|
from app import db
|
||
|
|
from app.dao.dao_utils import transactional
|
||
|
|
from app.models import Complaint
|
||
|
|
|
||
|
|
|
||
|
|
@transactional
|
||
|
|
def save_complaint(complaint):
|
||
|
|
db.session.add(complaint)
|
||
|
|
|
||
|
|
|
||
|
|
def fetch_complaints_by_service(service_id):
|
||
|
|
return Complaint.query.filter_by(service_id=service_id).all()
|