User session fixes

This commit is contained in:
Magnus Åhall 2024-01-05 21:14:55 +01:00
parent 52fba2289e
commit afa113b8b7
5 changed files with 11 additions and 42 deletions

View file

@ -79,6 +79,9 @@ func NodeTree(userID, startNodeID int) (nodes []Node, err error) {// {{{
for rows.Next() {
node := Node{}
node.Complete = false
node.Crumbs = []Node{}
node.Children = []Node{}
node.Files = []File{}
if err = rows.StructScan(&node); err != nil {
return
}
@ -385,7 +388,7 @@ func SearchNodes(userID int, search string) (nodes []Node, err error) {// {{{
updated
FROM node
WHERE
user_id = $1
user_id = $1 AND
crypto_key_id IS NULL AND
(
content ~* $2 OR