Skip to content
Snippets Groups Projects
Commit a76ff604 authored by Anton Sarukhanov's avatar Anton Sarukhanov
Browse files

WIP

parent 2c64d104
No related branches found
No related tags found
No related merge requests found
from flask import jsonify
from localq import app
@app.route('/')
def index():
return 'Hello world!'
@app.route('/route')
def lgthinq_route():
return jsonify({
'result': {
'apiServer': 'https://aic-common.lgthinq.com:443',
'mqttServer': 'ssl://a3phael99lf879.iot.us-west-2.amazonaws:8883',
},
'resultCode': '0000'
})
@app.route('/route/certificate')
def lgthinq_certificate_list():
lgthinq_ssl_root = '' # TODO: Our root here.
if request.args.get('name'):
return jsonify({
'result': {
'certificatePem': lgthinq_ssl_root,
},
'resultCode': '0000'
})
else:
return jsonify({
'result': [
'common-server',
'aws-iot',
],
'resultCode': '0000'
})
@app.route('/', defaults={'path': ''})
@app.route('/<path:path>')
def catchall(path):
print('hello')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment