2021-02-13 08:39:05 -08:00
|
|
|
package frontend
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (f *Frontend) home(w http.ResponseWriter, r *http.Request) {
|
2021-02-13 08:52:59 -08:00
|
|
|
words, err := f.hq.Random()
|
2021-02-13 08:39:05 -08:00
|
|
|
if err != nil {
|
|
|
|
w.Write([]byte(err.Error()))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
w.Write([]byte(words))
|
|
|
|
}
|