Finish up importing notes

This commit is contained in:
Tracker-Friendly 2024-05-23 17:55:12 +01:00
parent 658e6d8e5c
commit 5f394198f5
1 changed files with 1 additions and 2 deletions

3
main
View File

@ -290,13 +290,12 @@ async def importnotes():
notes = data["notes"]
userCookie = get_session(secretKey)
user = get_user(userCookie["id"])
conn = get_db_connection()
notejson = loads(notes)
for note in notejson:
conn.execute("INSERT INTO notes (title, content, creator, created, edited) VALUES (?, ?, ?, ?, ?)",
(note["title"], note["content"], note["id"], note["created"], note["edited"])
(note["title"], note["content"], userCookie["id"], note["created"], note["edited"]))
conn.commit()
conn.close()