def api_token(*args, **kwargs): data = Advanced_API.authErrors() if data: return Response(json.dumps(data[0], indent=2, sort_keys=True, default=json_util.default), mimetype='application/json'), data[1] else: return API.api(funct)(*args, **kwargs)
def api_dbInfo(self): errors = Advanced_API.authErrors() admin = False if errors and errors[0].get( 'reason') == "Authentication needed" else True return API.api(db.getDBStats)(admin)
def api_dbInfo(self): errors = Advanced_API.authErrors() admin = False if errors and errors[0].get('reason') == "Authentication needed" else True return API.api(db.getDBStats)(admin)