Finish up importing notes
This commit is contained in:
parent
658e6d8e5c
commit
5f394198f5
3
main
3
main
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue