feat: sns webhook
feat: text content type handler feat: email blocking table
This commit is contained in:
+5
-1
@@ -2,10 +2,12 @@ from fastapi import APIRouter, Depends, Security
|
||||
from middleware.auth_dependency import auth_required
|
||||
from fastapi.security import HTTPBearer
|
||||
|
||||
from apis.endpoints import sns
|
||||
|
||||
# Import the security scheme
|
||||
bearer_scheme = HTTPBearer(scheme_name="Bearer Authentication")
|
||||
|
||||
from .endpoints import clinics, doctors, calender, appointments, patients, admin, auth, s3, users, clinicDoctor, dashboard, call_transcripts, notifications
|
||||
from .endpoints import clinics, doctors, calender, appointments, patients, admin, auth, s3, users, clinicDoctor, dashboard, call_transcripts, notifications,sns
|
||||
|
||||
api_router = APIRouter()
|
||||
# api_router.include_router(twilio.router, prefix="/twilio")
|
||||
@@ -19,6 +21,8 @@ api_router.include_router(appointments.router, prefix="/appointments", tags=["ap
|
||||
|
||||
api_router.include_router(patients.router, prefix="/patients", tags=["patients"])
|
||||
|
||||
api_router.include_router(sns.router, prefix="/sns", tags=["sns"], include_in_schema=False)
|
||||
|
||||
api_router.include_router(
|
||||
admin.router,
|
||||
prefix="/admin",
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
from typing import Optional
|
||||
from fastapi import APIRouter, Body, Header
|
||||
from fastapi import Request
|
||||
from services.authService import AuthService
|
||||
from schemas.BaseSchemas import SNSBase
|
||||
import json
|
||||
router = APIRouter()
|
||||
|
||||
@router.post("/")
|
||||
async def send_sms(request: Request):
|
||||
body = await request.body()
|
||||
body = json.loads(body)
|
||||
AuthService().blockEmailSNS(body)
|
||||
return "OK"
|
||||
Reference in New Issue
Block a user