adding the correct vars to env
This commit is contained in:
parent
f9ef240749
commit
8f3c9c33cb
|
@ -37,6 +37,7 @@ class DevicehubConfig(Config):
|
|||
DB_PASSWORD = config('DB_PASSWORD', 'ereuse')
|
||||
DB_HOST = config('DB_HOST', 'localhost')
|
||||
DB_DATABASE = config('DB_DATABASE', 'devicehub')
|
||||
DB_SCHEMA = config('DB_SCHEMA', 'dbtest')
|
||||
SQLALCHEMY_DATABASE_URI = 'postgresql://{user}:{pw}@{host}/{db}'.format(
|
||||
user=DB_USER,
|
||||
pw=DB_PASSWORD,
|
||||
|
|
|
@ -293,14 +293,14 @@ class InternalStatsView(DeviceView):
|
|||
return output
|
||||
|
||||
|
||||
class WbConfDocumentView(View):
|
||||
class WbConfDocumentView(DeviceView):
|
||||
def get(self, wbtype: str):
|
||||
if not wbtype.lower() in ['usodyrate', 'usodywipe']:
|
||||
return jsonify('')
|
||||
|
||||
data = {'token': '111',
|
||||
'host': 'localhost',
|
||||
'inventory': 'dbtest'
|
||||
data = {'token': g.user.token,
|
||||
'host': app.config['DB_HOST'],
|
||||
'inventory': app.config['DB_SCHEMA']
|
||||
}
|
||||
data['erase'] = False if wbtype == 'usodyrate' else True
|
||||
|
||||
|
|
Reference in New Issue