Skip to content

Commit

Permalink
Fix vulnerabilities. Set minimum Python version to 3.6.8 (#576)
Browse files Browse the repository at this point in the history
* Fix vulnerabilities. Set minimum Python version to 3.6.8
* Fix tests
  • Loading branch information
Mec-iS authored May 24, 2021
1 parent b9aebc4 commit 292743e
Show file tree
Hide file tree
Showing 6 changed files with 182 additions and 134 deletions.
13 changes: 0 additions & 13 deletions hydrus/app_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
import uuid
from flask_cors import CORS
from flask_restful import Api
from hydrus_logger import HydrusLogger
from hydrus.resources import (Index, Vocab, Contexts, Entrypoint,
ItemCollection, Item, Items, ItemMember)

logger = HydrusLogger().get_logger()


def app_factory(api_name: str = "api", vocab_route: str = "vocab") -> Flask:
"""
Expand All @@ -23,16 +20,6 @@ def app_factory(api_name: str = "api", vocab_route: str = "vocab") -> Flask:
app.url_map.strict_slashes = False
api = Api(app)

@app.after_request
def logging_request_response(response):
if response.location and response.status_code != 302:
logger.info(" {} {}:{} Object_created_at : {}, status_code : {} "
.format(uuid.uuid4(), request.method, request.path, response.location, response.status))
else:
logger.info(" {} {}:{} status_code : {} "
.format(uuid.uuid4(), request.method, request.path, response.status))
return response

# Redirecting root_path to root_path/api_name
if api_name:
@app.route("/")
Expand Down
15 changes: 0 additions & 15 deletions hydrus/hydrus_logger.py

This file was deleted.

Loading

0 comments on commit 292743e

Please sign in to comment.