mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Merge pull request #2928 from alphagov/serve-on-slash-guest-list
Rename API URLs for guest list to guest list
This commit is contained in:
17
app/dao/service_guest_list_dao.py
Normal file
17
app/dao/service_guest_list_dao.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from app import db
|
||||
from app.models import ServiceGuestList
|
||||
|
||||
|
||||
def dao_fetch_service_guest_list(service_id):
|
||||
return ServiceGuestList.query.filter(
|
||||
ServiceGuestList.service_id == service_id).all()
|
||||
|
||||
|
||||
def dao_add_and_commit_guest_list_contacts(objs):
|
||||
db.session.add_all(objs)
|
||||
db.session.commit()
|
||||
|
||||
|
||||
def dao_remove_service_guest_list(service_id):
|
||||
return ServiceGuestList.query.filter(
|
||||
ServiceGuestList.service_id == service_id).delete()
|
||||
@@ -1,17 +0,0 @@
|
||||
from app import db
|
||||
from app.models import ServiceWhitelist
|
||||
|
||||
|
||||
def dao_fetch_service_whitelist(service_id):
|
||||
return ServiceWhitelist.query.filter(
|
||||
ServiceWhitelist.service_id == service_id).all()
|
||||
|
||||
|
||||
def dao_add_and_commit_whitelisted_contacts(objs):
|
||||
db.session.add_all(objs)
|
||||
db.session.commit()
|
||||
|
||||
|
||||
def dao_remove_service_whitelist(service_id):
|
||||
return ServiceWhitelist.query.filter(
|
||||
ServiceWhitelist.service_id == service_id).delete()
|
||||
Reference in New Issue
Block a user