Added API route to edit camera config

This commit is contained in:
Joel Collins 2019-01-15 12:17:14 +00:00
parent a8c9a7e7dd
commit 6a374d093a
3 changed files with 86 additions and 1 deletions

View file

@ -9,9 +9,16 @@ class JsonPayload:
"""
# Try to load as json
self.json = request.get_json() #: dict: Dictionary representation of request JSON
if self.json is None:
self.json = {}
# Store raw response data
self.data = request.get_data() #: str: String representation of request data
if self.data is None:
self.data = ""
def param(self, key, default=None, convert=None):
"""
Check if a key exists in a JSON/dictionary payload, and returns it.