mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
make formatting module non-static
This commit is contained in:
@@ -24,6 +24,8 @@ from starlette.middleware.cors import CORSMiddleware
|
||||
from ...config import Configuration
|
||||
from ...core import NominatimAPIAsync
|
||||
from ... import v1 as api_impl
|
||||
from ...result_formatting import FormatDispatcher
|
||||
from ...v1.format import dispatch as formatting
|
||||
from ..asgi_adaptor import ASGIAdaptor, EndpointFunc
|
||||
from ... import logging as loglib
|
||||
|
||||
@@ -70,6 +72,10 @@ class ParamWrapper(ASGIAdaptor):
|
||||
return cast(Configuration, self.request.app.state.API.config)
|
||||
|
||||
|
||||
def formatting(self) -> FormatDispatcher:
|
||||
return formatting
|
||||
|
||||
|
||||
def _wrap_endpoint(func: EndpointFunc)\
|
||||
-> Callable[[Request], Coroutine[Any, Any, Response]]:
|
||||
async def _callback(request: Request) -> Response:
|
||||
|
||||
Reference in New Issue
Block a user