fix: improved moisture sensor

This commit is contained in:
Elias Renman
2023-05-29 20:03:08 +02:00
parent 6a5a76f808
commit 2853d8a4c0
3 changed files with 18 additions and 6 deletions

View File

@@ -40,7 +40,7 @@ class Endpoint:
return
try:
body = get_body(request)
if body:
if body is str and body != "":
kwargs = dict(**kwargs, body=body)
val = function(instance, *args, **kwargs)
@@ -71,6 +71,7 @@ def get_body(request: str):
return
content_type_index = index
if (content_type_index + 4) == index:
return item