go1.16 and embed

This commit is contained in:
ston1th 2021-02-18 22:36:49 +01:00
commit 8e7bcfc21b
37 changed files with 98 additions and 1134 deletions

View file

@ -10,31 +10,15 @@ type route struct {
Methods []string
}
var static = []route{
var registerRoutes = []route{
{
core.Favicon,
staticHandler,
[]string{"GET"},
},
{
core.BootstrapCSS,
staticHandler,
[]string{"GET"},
},
{
core.CustomCSS,
staticHandler,
[]string{"GET"},
core.IndexURI,
jwtRegisterHandler(
registerHandler),
[]string{"GET", "POST"},
},
}
var registerRoutes = append(static, route{
core.IndexURI,
jwtRegisterHandler(
registerHandler),
[]string{"GET", "POST"},
})
var prefixRoutes = []route{
{
core.RawPrefix,
@ -94,7 +78,7 @@ var prefixRoutes = []route{
},
}
var routes = append(static, []route{
var routes = []route{
{
core.SearchURI,
jwtHandler(
@ -177,4 +161,4 @@ var routes = append(static, []route{
logoutHandler),
[]string{"GET", "POST"},
},
}...)
}