|
|
@ -26,9 +26,7 @@ func main() {
|
|
|
|
db.Migrate()
|
|
|
|
db.Migrate()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
r := gin.Default()
|
|
|
|
r := gin.Default()
|
|
|
|
dataPath := os.Getenv("DATA")
|
|
|
|
|
|
|
|
r.Static("/webassets", "./webassets")
|
|
|
|
|
|
|
|
r.Static("/assets", dataPath)
|
|
|
|
|
|
|
|
r.Use(setupSettings())
|
|
|
|
r.Use(setupSettings())
|
|
|
|
r.Use(gin.Recovery())
|
|
|
|
r.Use(gin.Recovery())
|
|
|
|
r.Use(location.Default())
|
|
|
|
r.Use(location.Default())
|
|
|
@ -143,6 +141,9 @@ func main() {
|
|
|
|
router = &r.RouterGroup
|
|
|
|
router = &r.RouterGroup
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dataPath := os.Getenv("DATA")
|
|
|
|
|
|
|
|
router.Static("/webassets", "./webassets")
|
|
|
|
|
|
|
|
router.Static("/assets", dataPath)
|
|
|
|
router.POST("/podcasts", controllers.AddPodcast)
|
|
|
|
router.POST("/podcasts", controllers.AddPodcast)
|
|
|
|
router.GET("/podcasts", controllers.GetAllPodcasts)
|
|
|
|
router.GET("/podcasts", controllers.GetAllPodcasts)
|
|
|
|
router.GET("/podcasts/:id", controllers.GetPodcastById)
|
|
|
|
router.GET("/podcasts/:id", controllers.GetPodcastById)
|
|
|
|