Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ CSharp Parking API/.vs
CSharp Parking API/obj
CSharp Parking API/bin

# Ignore SQLite database files
CSharp Parking API/Database/*.db
*.db
*.db-shm
*.db-wal
*.sqlite
*.sqlite3

# Ignore environment-specific appsettings (keep appsettings.json committed)
CSharp Parking API/appsettings.Development.json

Expand Down
Binary file added CSharp Parking API/Database/parking.db
Binary file not shown.
6 changes: 6 additions & 0 deletions Import_Data_To_Database.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import getpass
import json
import sqlite3
from datetime import datetime
Expand Down Expand Up @@ -127,6 +128,11 @@ def insert_payments(cursor, payments):
cursor.execute(sql, tuple(db_payment.values()))

def main():
# Require admin token before running
admin_token = getpass.getpass('Voer admin token in (verplicht): ')
if not admin_token or not admin_token.strip():
print('Geen admin token opgegeven. Import wordt afgebroken.')
return
conn = sqlite3.connect(DB_PATH)
cursor = conn.cursor()
# Load and insert users
Expand Down
Loading