[Static]: move to root

This commit is contained in:
Denis Zheleztsov 2021-03-25 18:25:40 +03:00
parent 07ec8e718b
commit 5d507d2810
Signed by: Difrex
GPG Key ID: D423378A747E202E
3 changed files with 12 additions and 11 deletions

View File

@ -5,7 +5,6 @@ import (
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"strings" "strings"
"time"
"github.com/gorilla/mux" "github.com/gorilla/mux"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
@ -232,15 +231,15 @@ func Serve(listen string, es ESConf) {
// Simple and clean SSR UI // Simple and clean SSR UI
ssr := newSSR("./templates", es) ssr := newSSR("./templates", es)
r.HandleFunc("/ssr", ssr.ssrRootHandler) r.HandleFunc("/", ssr.ssrRootHandler)
http.Handle("/", r) http.Handle("/", r)
srv := http.Server{ srv := http.Server{
Handler: r, Handler: r,
Addr: listen, Addr: listen,
WriteTimeout: 15 * time.Second, // WriteTimeout: 15 * time.Second,
ReadTimeout: 15 * time.Second, // ReadTimeout: 15 * time.Second,
} }
log.Print("Listening IDEC API on ", listen) log.Print("Listening IDEC API on ", listen)

View File

@ -111,12 +111,8 @@ func (es ESConf) GetEchoMessageHashes(echo string) []string {
log.Error(err.Error()) log.Error(err.Error())
return hashes return hashes
} }
defer resp.Body.Close() defer resp.Body.Close()
content, _ := ioutil.ReadAll(resp.Body)
log.Info(string(content))
var esr ESSearchResp var esr ESSearchResp
err = json.NewDecoder(resp.Body).Decode(&esr) err = json.NewDecoder(resp.Body).Decode(&esr)
if err != nil { if err != nil {
@ -253,7 +249,7 @@ func (es ESConf) GetUEchoMessageHashes(echoes string) []string {
o, err := strconv.Atoi(oflim[0]) o, err := strconv.Atoi(oflim[0])
l, err := strconv.Atoi(oflim[1]) l, err := strconv.Atoi(oflim[1])
if err != nil { if err != nil {
log.Print(err) log.Error(err)
} else { } else {
offset = o offset = o
limit = l limit = l

View File

@ -1,4 +1,10 @@
{{ define "post" }} {{ define "post" }}
<!--
Post component.
How to use:
{ template "post" .Posts[0] }
-->
<div class="card container dynamic-post dynamic-opacity-95 p-3 mb-3"> <div class="card container dynamic-post dynamic-opacity-95 p-3 mb-3">
<div class="card-body p-3"> <div class="card-body p-3">