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:
@ -582,15 +582,6 @@ class Helpers:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_announcements():
|
def get_announcements():
|
||||||
data = []
|
data = []
|
||||||
data = [
|
|
||||||
{
|
|
||||||
"id": "4db1a43b-d451-4abc-bb10-5a45676d95f7",
|
|
||||||
"date": "Unknown",
|
|
||||||
"title": "Error getting Announcements",
|
|
||||||
"desc": "Error getting Announcements",
|
|
||||||
"link": "",
|
|
||||||
}
|
|
||||||
]
|
|
||||||
try:
|
try:
|
||||||
response = requests.get("https://craftycontrol.com/notify.json", timeout=2)
|
response = requests.get("https://craftycontrol.com/notify.json", timeout=2)
|
||||||
data = json.loads(response.content)
|
data = json.loads(response.content)
|
||||||
|
@ -63,10 +63,8 @@ class ApiAnnounceIndexHandler(BaseApiHandler):
|
|||||||
_,
|
_,
|
||||||
_user,
|
_user,
|
||||||
) = auth_data
|
) = auth_data
|
||||||
print(self.request)
|
|
||||||
try:
|
try:
|
||||||
data = json.loads(self.request.body)
|
data = json.loads(self.request.body)
|
||||||
print(data)
|
|
||||||
except json.decoder.JSONDecodeError as e:
|
except json.decoder.JSONDecodeError as e:
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400, {"status": "error", "error": "INVALID_JSON", "error_data": str(e)}
|
400, {"status": "error", "error": "INVALID_JSON", "error_data": str(e)}
|
||||||
|
Reference in New Issue
Block a user