first commit
This commit is contained in:
13
app/notifications/service.py
Normal file
13
app/notifications/service.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.notifications.repository import create_notification_log
|
||||
from app.notifications.schemas import NotificationRequest
|
||||
|
||||
|
||||
async def enqueue_notification(db: AsyncSession, payload: NotificationRequest) -> None:
|
||||
await create_notification_log(
|
||||
db,
|
||||
user_id=payload.user_id,
|
||||
event_type=payload.event_type,
|
||||
payload=payload.payload.__repr__(),
|
||||
)
|
||||
Reference in New Issue
Block a user