diff --git a/geomagio/api/ws/DataApiQuery.py b/geomagio/api/ws/DataApiQuery.py index 9f54f6e8a284ff57e6c9d9783b2a1c85e6ac0233..16bc7180f48ee1bcaa26ca3fb49a11c3daa0c2e6 100644 --- a/geomagio/api/ws/DataApiQuery.py +++ b/geomagio/api/ws/DataApiQuery.py @@ -167,6 +167,7 @@ class DataApiQuery(BaseModel): # format: Union[OutputFormat, str] = OutputFormat.IAGA2002 # data_host: Union[DataHost, str] = DataHost.DEFAULT #This parameter also has no meaning in the Filter alrogithm use case + # The new class inheriting from DataApiQuery class FilterDataApiQuery(DataApiQuery): input_sampling_period: SamplingPeriod = SamplingPeriod.SECOND diff --git a/geomagio/api/ws/app.py b/geomagio/api/ws/app.py index cea8dc94aecf3c577fee17c71892bb86737c3bba..3018c39e1fc2510ed6be18394538245db8ab48a9 100644 --- a/geomagio/api/ws/app.py +++ b/geomagio/api/ws/app.py @@ -46,9 +46,9 @@ if METADATA_ENDPOINT: @app.middleware("http") async def add_headers(request: Request, call_next): response = await call_next(request) - response.headers[ - "Access-Control-Allow-Headers" - ] = "accept, origin, authorization, content-type" + response.headers["Access-Control-Allow-Headers"] = ( + "accept, origin, authorization, content-type" + ) response.headers["Access-Control-Allow-Methods"] = "*" response.headers["Access-Control-Allow-Origin"] = "*" response.headers["Cache-Control"] = "max-age=60"