owl-blogs/web/utils.go

17 lines
309 B
Go
Raw Permalink Normal View History

2023-07-17 18:44:59 +00:00
package web
import (
"owl-blogs/app/repository"
"owl-blogs/config"
2023-07-17 18:44:59 +00:00
"owl-blogs/domain/model"
)
func getSiteConfig(repo repository.ConfigRepository) model.SiteConfig {
siteConfig := model.SiteConfig{}
err := repo.Get(config.SITE_CONFIG, &siteConfig)
2023-07-17 18:44:59 +00:00
if err != nil {
panic(err)
}
return siteConfig
2023-07-17 18:44:59 +00:00
}