added wip to tunes page
This commit is contained in:
@@ -34,8 +34,9 @@ func NewMusicController(r *repos.MusicRepo) *MusicController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RegisterMusicGroup(r *gin.RouterGroup) {
|
func RegisterMusicGroup(r *gin.RouterGroup) {
|
||||||
c := NewMusicController(repos.NewMusicRepo("dsn"))
|
r.GET("/", func(c *gin.Context) {
|
||||||
r.GET("/", c.IndexMusicPage)
|
c.HTML(http.StatusOK, "wip.tmpl", &gin.H{})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mc *MusicController) IndexMusicPage(c *gin.Context) {
|
func (mc *MusicController) IndexMusicPage(c *gin.Context) {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ func NewMusicRepo(dsnPath string) *MusicRepo {
|
|||||||
|
|
||||||
func (mr *MusicRepo) GetAllSongs() (*[]models.Music, error) {
|
func (mr *MusicRepo) GetAllSongs() (*[]models.Music, error) {
|
||||||
songs := new([]models.Music)
|
songs := new([]models.Music)
|
||||||
err := mr.DB.Table("music").Order("name desc").Scan(songs).Error
|
err := mr.DB.Table("music").Scan(songs).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.New("Could not load music from database")
|
return nil, errors.New("Could not load music from database")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
This page is not finished yet, check back later!
|
This page is not finished yet, check back later!
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="https://gitlab.com/rawleyIfowler/rawleydotxyz">Development progress</a>
|
<a href="https://github.com/rawleyfowler/rawleydotxyz">Development progress</a>
|
||||||
</p>
|
</p>
|
||||||
{{ template "footer_no_banners.tmpl" . }}
|
{{ template "footer_no_banners.tmpl" . }}
|
||||||
|
|||||||
Reference in New Issue
Block a user