Skip to content
Snippets Groups Projects
Commit 8c137123 authored by Sebastian Lobinger's avatar Sebastian Lobinger
Browse files

update addApp in sams_app.py to pass test_Sams_hub.py and fix #29

parent a18a9f1a
No related branches found
No related tags found
1 merge request!20Resolve "Apps sollen mit Alias an Hub angemeldet werden können"
This commit is part of merge request !20. Comments created here will be created in the context of that merge request.
......@@ -30,7 +30,7 @@ class SAMSHub:
self._flaskApp.context_processor(self._context_processor)
self._flaskApp.secret_key = 'my awesome SAMSHub secret_key'
def addApp(self, app: SAMSApp = None):
def addApp(self, app: SAMSApp = None, alias = None):
if not isinstance(app, SAMSApp):
raise TypeError('Argument app has to be a SAMSApp.')
self._apps[app.name] = app
......@@ -38,7 +38,7 @@ class SAMSHub:
if app.name == self._config.get('main_app'):
self._flaskApp.register_blueprint(app.blueprint)
self._flaskApp.register_blueprint(
app.blueprint, url_prefix = '/' + app.name)
app.blueprint, url_prefix = '/' + (alias or app.name))
@property
def appKeys(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment