From 3cb2708704ec7900ba086781f3cecc736f238471 Mon Sep 17 00:00:00 2001 From: Bryan Cerrati Date: Thu, 19 Jun 2025 14:59:45 -0400 Subject: [PATCH] Delete --- app/db/keepalive.db | Bin 16384 -> 16384 bytes app/keep.py | 10 +++++++++- app/templates/keepaliveshowpage.html | 18 +++++++++--------- teminalcommand.ps1 | 4 ---- 4 files changed, 18 insertions(+), 14 deletions(-) delete mode 100644 teminalcommand.ps1 diff --git a/app/db/keepalive.db b/app/db/keepalive.db index 7a6ce16a334bb422f004ff9268881f131607863a..875f0a5b16ad484d915f7b167fbe4579d1c0791d 100644 GIT binary patch delta 44 xcmZo@U~Fh$oFL68Fj2;tQD9@j5`7*90R{&Cr~FGmaI>I53IF64`^1Tk(f}0Y49EZg delta 69 zcmZo@U~Fh$oFL7}KT*b+k$+>t5`7*<{-+H5Px+UC;ATOA68_08_KDJxY^)5Tva%(q WxdjGh`i7SJMy7^_RwkBKM&/', 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