mirror of https://github.com/velour/catbase.git
Changing URLs to GET for sharing
This commit is contained in:
parent
a87835b54a
commit
11feafbee0
|
@ -456,7 +456,7 @@ func (p *FactoidPlugin) RegisterWeb() *string {
|
|||
|
||||
func (p *FactoidPlugin) serveQuery(w http.ResponseWriter, r *http.Request) {
|
||||
context := make(map[string]interface{})
|
||||
if e := r.PostFormValue("entry"); e != "" {
|
||||
if e := r.FormValue("entry"); e != "" {
|
||||
var entries []Factoid
|
||||
p.Coll.Find(bson.M{"trigger": bson.M{"$regex": e}}).All(&entries)
|
||||
context["Count"] = fmt.Sprintf("%d", len(entries))
|
||||
|
|
|
@ -11,7 +11,7 @@ var factoidIndex string = `
|
|||
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.1.0/pure-min.css">
|
||||
</head>
|
||||
<div>
|
||||
<form action="/factoid" method="POST" class="pure-form">
|
||||
<form action="/factoid" method="GET" class="pure-form">
|
||||
<fieldset>
|
||||
<legend>Search for a factoid</legend>
|
||||
<input type="text" name="entry" placeholder="trigger" value="{{.Search}}" />
|
||||
|
|
Loading…
Reference in New Issue