post-rebase fixes
This commit is contained in:
parent
b28f651cf8
commit
f0d5eb7d92
|
@ -9,6 +9,7 @@ from starlette.applications import Starlette
|
|||
from starlette.middleware import Middleware
|
||||
from starlette.requests import Request
|
||||
from starlette.responses import Response, JSONResponse
|
||||
from starlette.routing import Route
|
||||
from starlette.types import ASGIApp
|
||||
from starlette.middleware.authentication import AuthenticationMiddleware
|
||||
|
||||
|
@ -102,9 +103,9 @@ def check_conf():
|
|||
DEBUG = True
|
||||
|
||||
debug_routes = [
|
||||
AppRoute('/', lambda request: PlainTextResponse('It Works!')),
|
||||
AppRoute('/user', lambda request: JSONResponse({'user':request.user})),
|
||||
AppRoute('/payload', lambda request: JSONResponse({'payload':request.payload}))
|
||||
Route('/', lambda request: PlainTextResponse('It Works!')),
|
||||
Route('/user', lambda request: JSONResponse({'user':request.user})),
|
||||
Route('/payload', lambda request: JSONResponse({'payload':request.payload}))
|
||||
] if DEBUG is True else []
|
||||
|
||||
app = Starlette(
|
||||
|
|
|
@ -4,7 +4,7 @@ from starlette.middleware.base import BaseHTTPMiddleware
|
|||
from starlette.routing import Match, Mount
|
||||
from starlette.types import ASGIApp, Receive, Scope, Send
|
||||
|
||||
from .models.api.view.acl import Acl as AclView
|
||||
from halfapi.models.api.view.acl import Acl as AclView
|
||||
|
||||
def match_route(scope: Scope):
|
||||
""" Checks all routes from "app" and checks if it matches with the one from
|
||||
|
|
Loading…
Reference in New Issue