User session fixes
This commit is contained in:
parent
52fba2289e
commit
afa113b8b7
5 changed files with 11 additions and 42 deletions
5
node.go
5
node.go
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue