Move config provider to _init to decouple from app

remove app references from validators
This commit is contained in:
Sam Chow 2018-05-24 14:58:38 -04:00
parent 86929c16d3
commit d45b925155
26 changed files with 54 additions and 51 deletions

View file

@ -64,7 +64,7 @@ VALIDATORS = {
AppTokenAuthValidator.name: AppTokenAuthValidator.validate,
}
def validate_service_for_config(service, config, password=None):
def validate_service_for_config(service, config, password=None, app=None):
""" Attempts to validate the configuration for the given service. """
if not service in VALIDATORS:
return {
@ -72,7 +72,7 @@ def validate_service_for_config(service, config, password=None):
}
try:
VALIDATORS[service](config, get_authenticated_user(), password)
VALIDATORS[service](config, get_authenticated_user(), password, app)
return {
'status': True
}