added music, and adjusted rss
This commit is contained in:
@@ -16,9 +16,8 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.Rawley Fowler, 2022
|
along with this program. If not, see <https://www.gnu.org/licenses/>.Rawley Fowler, 2022
|
||||||
*/
|
*/
|
||||||
import (
|
|
||||||
"gorm.io/gorm"
|
import "gorm.io/gorm"
|
||||||
)
|
|
||||||
|
|
||||||
type BlogPost struct {
|
type BlogPost struct {
|
||||||
gorm.Model
|
gorm.Model
|
||||||
|
|||||||
26
models/music.go
Normal file
26
models/music.go
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
package models
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright (C) 2022 Rawley Fowler
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.Rawley Fowler, 2022
|
||||||
|
*/
|
||||||
|
|
||||||
|
import "gorm.io/gorm"
|
||||||
|
|
||||||
|
type Music struct {
|
||||||
|
gorm.Model
|
||||||
|
Name string `json:"name" gorm:"primaryKey unique"`
|
||||||
|
Url string `json:"url" gorm:"not null"`
|
||||||
|
}
|
||||||
31
repos/music_repo.go
Normal file
31
repos/music_repo.go
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
package repos
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright (C) 2022 Rawley Fowler
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.Rawley Fowler, 2022
|
||||||
|
*/
|
||||||
|
|
||||||
|
import (
|
||||||
|
"gorm.io/gorm"
|
||||||
|
)
|
||||||
|
|
||||||
|
type MusicRepo struct {
|
||||||
|
DB *gorm.DB
|
||||||
|
}
|
||||||
|
|
||||||
|
func (mr *MusicRepo) GetAllSongs() []Music {
|
||||||
|
songs := []Music{}
|
||||||
|
mr.DB.Select()
|
||||||
|
}
|
||||||
@@ -18,7 +18,10 @@
|
|||||||
<a class="nav-item" href="/donate">donate</a>
|
<a class="nav-item" href="/donate">donate</a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a class="nav-item" href="https://gitlab.com/rawleyIfowler">software</a>
|
<a class="nav-item" href="/music">tunes</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="nav-item" href="https://github.com/rawleyfowler">software</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user