Skip to content

Commit

Permalink
grab intel by name vs index
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseflorig committed Mar 29, 2023
1 parent cdfe0b2 commit 211044a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion msn-api-server/msn-api-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ async def socket_handler(websocket, path):
elif message.startswith("updateIntel"):
data = { 'msn_data': message.split(' ')[1] }

post_url = DATA_SERVERS[3]['url'] + '/updateMsn'
for server in DATA_SERVERS:
if server['name'] == "intel":
post_url = server['url'] + '/updateMsn'

post_data = parse.urlencode(data).encode()
req = request.Request(post_url, data=post_data)
resp = request.urlopen(req)
Expand Down

0 comments on commit 211044a

Please sign in to comment.