hanze/muizenval

link in mail (52ab36175313bc21e8b9322d4579e7008e702ce2)
Repositories

commit 52ab36175313bc21e8b9322d4579e7008e702ce2
parent 73eabc84bd2f909779738ab51442828f702207c7
Author: Friedel Schön <[email protected]>
Date:   Thu, 30 Jun 2022 11:55:48 +0200

link in mail

Diffstat:
Mremote.py2+-
Mserver/socket.py4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/remote.py b/remote.py @@ -14,7 +14,7 @@ import websockets WEBSOCKET_PORT = 1612 -host, port = 'localhost', 5000 +host, port = 'muizenval.tk', 80 remote = Remote(115200) token: Optional[str] = None diff --git a/server/socket.py b/server/socket.py @@ -62,8 +62,8 @@ def update_status(): if trap.owner: stc = Statistic(user=trap.owner, date=datetime.now()) db.session.add(stc) - # os.system( - # f"echo -e -s \"Je muizenval '{trap.name}' heeft iets gevangen!\\n\\nGroetjes uw Team Benni!\" | mailx -s 'Muizenval werd geactiveerd' {trap.owner_class().email}") # type: ignore + os.system( + f"echo \"<p>Uw muizenval '{trap.name}' heeft iets gevangen!<br>Ga naar <a href='http://muizenval.tk/traps'>uw dashboard</a>.</p><p>Groetjes Team Benni!</p>\" | mailx -a 'Content-Type: text/html' -s 'Muizenval is geactiveerd' {trap.owner_class().email}") # type: ignore print('Email sent!') trap.last_status = datetime.now()