Charts V1

This commit is contained in:
daru
2022-06-29 22:40:46 +02:00
parent 0461ec1717
commit da474ecede
9 changed files with 234 additions and 76 deletions

11
ober.go
View File

@@ -9,6 +9,7 @@ import (
"time"
"github.com/fasthttp/router"
"github.com/gookit/color"
"github.com/valyala/fasthttp"
"github.com/xujiajun/nutsdb"
)
@@ -46,11 +47,15 @@ func Start(ctx *fasthttp.RequestCtx) {
oracles, err := MmReadOracle()
if err != nil {
addErrorToCtx(ctx, err)
return
color.Errorln(err.Error())
}
WriteIndex(ctx, season, oracles, logOut.String())
charts, err := BuildMovieCharts()
if err != nil {
color.Errorln(err.Error())
}
WriteIndex(ctx, season, oracles, charts, logOut.String())
ctx.SetContentType("text/html; charset=utf-8")
ctx.SetStatusCode(fasthttp.StatusOK)