add owncast instance url to config
This commit is contained in:
parent
ef88403ca4
commit
ad692e5938
|
@ -1,3 +1,4 @@
|
|||
SECRET_KEY='dev'
|
||||
DATABASE='./instance/tlapbot.sqlite'
|
||||
OWNCAST_ACCESS_TOKEN=''
|
||||
OWNCAST_INSTANCE_URL='http://localhost:8080'
|
|
@ -36,7 +36,7 @@ def addUserToDatabase(user_id, db):
|
|||
print("To user:", user_id)
|
||||
|
||||
def sendChat(message): # TODO: url to constant?
|
||||
url = 'http://localhost:8080/api/integrations/chat/send'
|
||||
url = current_app.config['OWNCAST_INSTANCE_URL'] + '/api/integrations/chat/send'
|
||||
headers = {"Authorization": "Bearer " + current_app.config['OWNCAST_ACCESS_TOKEN']}
|
||||
r = requests.post(url, headers=headers, json={"body": message})
|
||||
return r.json()
|
||||
|
|
Loading…
Reference in New Issue