This commit is contained in:
maaa 2023-07-23 20:36:55 +00:00
parent 2537f5c754
commit 035715e44b
1 changed files with 2 additions and 1 deletions

3
main
View File

@ -49,11 +49,12 @@ def get_note(id):
def get_space(id): def get_space(id):
conn = get_db_connection() conn = get_db_connection()
notes = conn.execute("SELECT content FROM notes WHERE creator = ? ORDER BY id DESC;", (id,)).fetchall() notes = conn.execute("SELECT content, title FROM notes WHERE creator = ? ORDER BY id DESC;", (id,)).fetchall()
conn.close() conn.close()
spacetaken = 0 spacetaken = 0
for x in notes: for x in notes:
spacetaken = spacetaken + len(x["content"].encode("utf-8")) spacetaken = spacetaken + len(x["content"].encode("utf-8"))
spacetaken = spacetaken + len(x["title"].encode("utf-8"))
return spacetaken return spacetaken
def get_session(id): def get_session(id):