mirror of https://github.com/velour/catbase.git
Fixes #15: Factoid interface is bangin
This commit is contained in:
parent
2fc9fd1c84
commit
38bfc59871
|
@ -468,7 +468,7 @@ func (p *FactoidPlugin) serveQuery(w http.ResponseWriter, r *http.Request) {
|
||||||
if e := r.PostFormValue("entry"); e != "" {
|
if e := r.PostFormValue("entry"); e != "" {
|
||||||
var entries []Factoid
|
var entries []Factoid
|
||||||
p.Coll.Find(bson.M{"trigger": e}).All(&entries)
|
p.Coll.Find(bson.M{"trigger": e}).All(&entries)
|
||||||
context["Count"] = fmt.Sprintf("Found %d entries", len(entries))
|
context["Count"] = fmt.Sprintf("%d", len(entries))
|
||||||
context["Entries"] = entries
|
context["Entries"] = entries
|
||||||
context["Search"] = e
|
context["Search"] = e
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue