add created by
This commit is contained in:
@@ -14,6 +14,7 @@ from aws_lambda_powertools.utilities.typing import LambdaContext
|
||||
|
||||
from api_gateway import JSONResponse
|
||||
from json_encoder import JSONEncoder
|
||||
from middlewares.authentication_middleware import AuthenticationMiddleware
|
||||
from routes import courses, enrollments, orders, orgs, users
|
||||
|
||||
logger = Logger(__name__)
|
||||
@@ -32,6 +33,7 @@ app = APIGatewayHttpResolver(
|
||||
debug=debug,
|
||||
serializer=serializer,
|
||||
)
|
||||
app.use(middlewares=[AuthenticationMiddleware()])
|
||||
app.enable_swagger(path='/swagger')
|
||||
app.include_router(courses.router, prefix='/courses')
|
||||
app.include_router(enrollments.router, prefix='/enrollments')
|
||||
@@ -45,7 +47,7 @@ app.include_router(users.emails, prefix='/users')
|
||||
app.include_router(users.orgs, prefix='/users')
|
||||
app.include_router(users.password, prefix='/users')
|
||||
app.include_router(orders.router, prefix='/orders')
|
||||
app.include_router(orgs.router, prefix='/orgs')
|
||||
app.include_router(orgs.add, prefix='/orgs')
|
||||
app.include_router(orgs.admins, prefix='/orgs')
|
||||
app.include_router(orgs.custom_pricing, prefix='/orgs')
|
||||
app.include_router(orgs.scheduled, prefix='/orgs')
|
||||
@@ -59,7 +61,7 @@ def health():
|
||||
|
||||
@app.exception_handler(ServiceError)
|
||||
def exc_error(exc: ServiceError):
|
||||
logger.exception(exc)
|
||||
# logger.exception(exc)
|
||||
|
||||
return JSONResponse(
|
||||
body={
|
||||
|
||||
Reference in New Issue
Block a user