mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Remove prints. Remove test notif
This commit is contained in:
parent
6c1e1b4737
commit
02df6de6d5
@ -582,15 +582,6 @@ class Helpers:
|
||||
@staticmethod
|
||||
def get_announcements():
|
||||
data = []
|
||||
data = [
|
||||
{
|
||||
"id": "4db1a43b-d451-4abc-bb10-5a45676d95f7",
|
||||
"date": "Unknown",
|
||||
"title": "Error getting Announcements",
|
||||
"desc": "Error getting Announcements",
|
||||
"link": "",
|
||||
}
|
||||
]
|
||||
try:
|
||||
response = requests.get("https://craftycontrol.com/notify.json", timeout=2)
|
||||
data = json.loads(response.content)
|
||||
|
@ -63,10 +63,8 @@ class ApiAnnounceIndexHandler(BaseApiHandler):
|
||||
_,
|
||||
_user,
|
||||
) = auth_data
|
||||
print(self.request)
|
||||
try:
|
||||
data = json.loads(self.request.body)
|
||||
print(data)
|
||||
except json.decoder.JSONDecodeError as e:
|
||||
return self.finish_json(
|
||||
400, {"status": "error", "error": "INVALID_JSON", "error_data": str(e)}
|
||||
|
Loading…
Reference in New Issue
Block a user