Optimized code
This commit is contained in:
+1
-3
@@ -1,10 +1,8 @@
|
||||
import requests
|
||||
import json
|
||||
import os
|
||||
|
||||
|
||||
def send_message(title, content):
|
||||
token = os.environ.get("TOKEN")
|
||||
def send_message(token, title, content):
|
||||
url = "http://www.pushplus.plus/send"
|
||||
data = {"token": token, "title": title, "content": content}
|
||||
body = json.dumps(data).encode(encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user