Externalize requestparser, flush persister on http request end

This commit is contained in:
lash
2024-09-10 23:09:10 +01:00
parent 8e3ff27bb8
commit 681f293d3c
5 changed files with 17 additions and 9 deletions

View File

@@ -195,7 +195,8 @@ func main() {
}
defer stateStore.Close()
sh := httpserver.NewSessionHandler(cfg, rs, stateStore, userdataStore, hl.Init)
rp := &httpserver.DefaultRequestParser{}
sh := httpserver.NewSessionHandler(cfg, rs, stateStore, userdataStore, rp, hl.Init)
s := &http.Server{
Addr: fmt.Sprintf("%s:%s", host, strconv.Itoa(int(port))),
Handler: sh,