Compare commits
1 Commits
1011360694
...
60ba8d4799
Author | SHA1 | Date |
---|---|---|
Ferdinand Thiessen | 60ba8d4799 |
|
@ -38,7 +38,7 @@ class CustomJSONEncoder(JSONEncoder):
|
|||
def __load_plugins(app):
|
||||
logger.info("Search for plugins")
|
||||
app.config["FG_PLUGINS"] = {}
|
||||
for entry_point in pkg_resources.iter_entry_points("flaschengeist.plugin"):
|
||||
for entry_point in pkg_resources.iter_entry_points("flaschengeist.plugins"):
|
||||
logger.debug("Found plugin: >{}<".format(entry_point.name))
|
||||
plugin = None
|
||||
if entry_point.name in config and config[entry_point.name].get("enabled", False):
|
||||
|
@ -111,7 +111,7 @@ def create_app(test_config=None):
|
|||
@app.after_request
|
||||
def after_request(response):
|
||||
header = response.headers
|
||||
header['Access-Control-Allow-Origin'] = '*'
|
||||
header["Access-Control-Allow-Origin"] = "*"
|
||||
header["Access-Control-Allow-Methods"] = "GET,HEAD,OPTIONS,POST,PUT"
|
||||
header["Access-Control-Allow-Headers"] = "Origin, X-Requested-With, Content-Type, Accept, Authorization"
|
||||
return response
|
||||
|
|
|
@ -11,7 +11,7 @@ def get_all():
|
|||
return Role.query.all()
|
||||
|
||||
|
||||
def get(role_name):
|
||||
def get(role_name) -> Role:
|
||||
if type(role_name) is int:
|
||||
role = Role.query.get(role_name)
|
||||
else:
|
||||
|
|
|
@ -39,7 +39,7 @@ class ModelSerializeMixin:
|
|||
key, value = d.popitem()
|
||||
return value
|
||||
return d
|
||||
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.serialize().__str__()
|
||||
|
||||
|
|
Loading…
Reference in New Issue