1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Fix server tests

This commit is contained in:
Maksym Pavlenko
2017-08-22 01:13:32 -07:00
parent 2bd28b4e85
commit 68d20820ae

View File

@ -39,10 +39,14 @@ func MakeHandlers(feed feed, cfg *config.AppConfig) http.Handler {
// Static files + HTML
log.Printf("using assets path: %s", cfg.AssetsPath)
r.Static("/assets", cfg.AssetsPath)
if cfg.AssetsPath != "" {
r.Static("/assets", cfg.AssetsPath)
}
log.Printf("using templates path: %s", cfg.TemplatesPath)
r.LoadHTMLGlob(path.Join(cfg.TemplatesPath, "*.html"))
if cfg.TemplatesPath != "" {
r.LoadHTMLGlob(path.Join(cfg.TemplatesPath, "*.html"))
}
conf := &oauth2.Config{
ClientID: cfg.PatreonClientId,