Added API route to edit camera config
This commit is contained in:
parent
a8c9a7e7dd
commit
6a374d093a
3 changed files with 86 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue