diff --git a/app/db/keepalive.db b/app/db/keepalive.db index 7a6ce16..875f0a5 100644 Binary files a/app/db/keepalive.db and b/app/db/keepalive.db differ diff --git a/app/keep.py b/app/keep.py index bdd9db6..f8de6dc 100644 --- a/app/keep.py +++ b/app/keep.py @@ -57,4 +57,12 @@ def getalive(location): @keep.route('/loc//', methods=["GET"]) def show_location(location): - return f"

Received keepalive from: {location}

" \ No newline at end of file + return f"

Received keepalive from: {location}

" + +@keep.route('/delete//', methods=["POST"]) +def delete_keepalive(item_id): + conn = get_db() + c = conn.cursor() + c.execute("DELETE FROM keepalive2 WHERE id = ?", (item_id,)) + conn.commit() + return redirect(url_for('keep.dispkeepalive')) diff --git a/app/templates/keepaliveshowpage.html b/app/templates/keepaliveshowpage.html index f581718..7040fc0 100644 --- a/app/templates/keepaliveshowpage.html +++ b/app/templates/keepaliveshowpage.html @@ -1,7 +1,6 @@ {% extends 'keepbase.html' %} {% block content %} - {% if items %} @@ -9,24 +8,25 @@ + - {% for item in items %} - + {% endfor %} + +
Location Date TimeDelete
{{ item.location }} {{ item.date }} {{ item.time }} +
+ +
+
{% else %}

No items to show.

{% endif %} - - - - - -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/teminalcommand.ps1 b/teminalcommand.ps1 deleted file mode 100644 index 1a63bec..0000000 --- a/teminalcommand.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -$CurlArgument = '-X', 'POST', - 'http://24.185.75.128:8889/bay/' -$CURLEXE = 'C:\Program Files\Git\mingw64\bin\curl.exe' -& $CURLEXE @CurlArgument \ No newline at end of file