This commit is contained in:
2026-02-25 15:13:51 +00:00
parent 6e50013a84
commit 8ad1650079
2 changed files with 2 additions and 1 deletions

0
server/src/data.db Normal file
View File

View File

@@ -24,6 +24,7 @@ CREATE TABLE IF NOT EXISTS val (
default_time TEXT NOT NULL DEFAULT '21:00'
)
""")
cursor.execute("INSERT INTO settings (default_time) VALUES (?)", ('21:00',))
conn.commit()
conn.close()
@@ -40,7 +41,7 @@ def mainpage():
items = cursor.fetchall()
cursor.execute("SELECT default_time FROM val")
default_time_row = cursor.fetchone()
default_time = default_time_row[0] if default_time_row else None
default_time = default_time_row[0] if default_time_row else '21:00'
conn.close()
return render_template('index.html', title='BS Shutdown', items=items, default_time=default_time)