sinkconvert2/Entries.py
2021-05-05 18:02:45 +02:00

21 lines
427 B
Python

import _typeshed
import logging
import werkzeug
from flask import request
import json
class Entry(object):
def __init__(self, ts, freq):
self.ts = ts
self.freq = freq
def insert(**args):
try:
body = request.json
logging.info("JSON Body: {}".format(body))
return "200"
except KeyError as e:
raise werkzeug.exceptions.InternalServerError("Key Error: {}".format(e))