Skip to content
Snippets Groups Projects
Commit 3a14eeb3 authored by Martin Larsson's avatar Martin Larsson
Browse files

dns functions

parent 26a2926a
No related branches found
No related tags found
No related merge requests found
from typing import List, Dict, Tuple
import flask
import mysql.connector
import json
import uuid
import bcrypt
import decimal
"""
Main file that creates the server and all routes as well as the database queries.
Note that the server is using self certified https. This certificate will become invalid sometime in 2022 so worth
checking if issues occur.
"""
# placeholder
app = flask.Flask(__name__)
config = {
'user': 'root',
'password': 'root',
'host': 'db',
'port': '3306',
'database': 'drip_drones'
}
# Example route
@app.route('/insert/drone', methods=['POST'])
def insert_drone():
json_req = flask.request.json
insert_drone_to_dns(json_req)
# Respond with a success message or similar.
return {"status": "success", "message": "Drone inserted."}, 200
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