You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
411 B

package Database
func GetAllSidebarLinks() ([]SidebarLink, error) {
var (
sidebar_links []SidebarLink
e error
)
e = DB.Model(&SidebarLink{}).
Find(&sidebar_links).
Error
return sidebar_links, e
}
func AddSidebarLink(name string, link string) error {
var sidebar_link SidebarLink
sidebar_link = SidebarLink{
Name: name,
Link: link,
}
return DB.Create(&sidebar_link).Error
}