typed-endpoint
Some checks are pending
deploy / deploy (push) Waiting to run

This commit is contained in:
Untone 2023-11-29 00:13:46 +03:00
parent aaf4c0b876
commit 6cd2fc0f80

View File

@ -4,7 +4,7 @@ from os.path import exists
from ariadne import load_schema_from_path, make_executable_schema from ariadne import load_schema_from_path, make_executable_schema
from ariadne.asgi import GraphQL from ariadne.asgi import GraphQL
from starlette.applications import Starlette from starlette.applications import Starlette
from starlette.endpoints import HTTPEndpoint from starlette.endpoints import HTTPEndpoint, Request
from starlette.responses import JSONResponse from starlette.responses import JSONResponse
from resolvers.author import create_author from resolvers.author import create_author
@ -40,7 +40,7 @@ async def shutdown():
class WebhookEndpoint(HTTPEndpoint): class WebhookEndpoint(HTTPEndpoint):
async def post(self, request): async def post(self, request: Request) -> JSONResponse:
try: try:
data = await request.json() data = await request.json()
if data: if data: