diff --git a/controllers/music.go b/controllers/music.go index 4248ae5..c6b7371 100644 --- a/controllers/music.go +++ b/controllers/music.go @@ -34,8 +34,9 @@ func NewMusicController(r *repos.MusicRepo) *MusicController { } func RegisterMusicGroup(r *gin.RouterGroup) { - c := NewMusicController(repos.NewMusicRepo("dsn")) - r.GET("/", c.IndexMusicPage) + r.GET("/", func(c *gin.Context) { + c.HTML(http.StatusOK, "wip.tmpl", &gin.H{}) + }) } func (mc *MusicController) IndexMusicPage(c *gin.Context) { diff --git a/repos/music_repo.go b/repos/music_repo.go index 00a868a..023753d 100644 --- a/repos/music_repo.go +++ b/repos/music_repo.go @@ -43,7 +43,7 @@ func NewMusicRepo(dsnPath string) *MusicRepo { func (mr *MusicRepo) GetAllSongs() (*[]models.Music, error) { 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 { return nil, errors.New("Could not load music from database") } diff --git a/templates/wip.tmpl b/templates/wip.tmpl index 92fc72c..b584c6a 100644 --- a/templates/wip.tmpl +++ b/templates/wip.tmpl @@ -4,6 +4,6 @@ This page is not finished yet, check back later!

- Development progress + Development progress

{{ template "footer_no_banners.tmpl" . }}