simplify tags
This commit is contained in:
parent
7686dfa474
commit
3c5be25cb3
6 changed files with 28 additions and 31 deletions
|
|
@ -7,7 +7,6 @@ import (
|
|||
"git.giftfish.de/ston1th/docstore/pkg/fs"
|
||||
"git.giftfish.de/ston1th/docstore/pkg/log"
|
||||
"git.giftfish.de/ston1th/docstore/pkg/otp"
|
||||
"git.giftfish.de/ston1th/docstore/pkg/tags"
|
||||
"git.giftfish.de/ston1th/jwt/v3"
|
||||
"html/template"
|
||||
"net/http"
|
||||
|
|
@ -187,11 +186,11 @@ func scanFile(ctx *Context, path string) (err error) {
|
|||
l.Printf("scanner: %s: %s", path, err)
|
||||
return
|
||||
}
|
||||
rt, err := ctx.Srv.DB.GetAllRTags()
|
||||
tags, err := ctx.Srv.DB.GetAllRTags()
|
||||
if err != nil {
|
||||
l.Printf("getTags: %s: %s", path, err)
|
||||
}
|
||||
found := tags.Find(txt, rt)
|
||||
found := tags.Match(txt)
|
||||
id, err := ctx.Srv.DB.Index.Add(txt, found)
|
||||
if err != nil {
|
||||
l.Printf("index: %s: %s", path, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue