1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-11 01:22:48 +00:00

feat: add user event log to admin page

This commit is contained in:
2019-08-24 12:47:53 -05:00
parent 72ba1e5621
commit 55a4bb73af
18 changed files with 230 additions and 26 deletions

View File

@@ -17,11 +17,11 @@ type Sound struct {
User User `json:"user"`
}
func SoundCreate(conn *gorm.DB, sound *Sound) error {
func SoundSave(conn *gorm.DB, sound *Sound) error {
return conn.Create(sound).Error
}
func SoundList(conn *gorm.DB) ([]Sound, error) {
func SoundGet(conn *gorm.DB) ([]Sound, error) {
sound := []Sound{}
err := conn.Set("gorm:auto_preload", true).Find(&sound).Error
return sound, err