2023-07-17 18:44:59 +00:00
|
|
|
package web
|
|
|
|
|
|
|
|
import (
|
|
|
|
"owl-blogs/app/repository"
|
2023-07-19 18:25:42 +00:00
|
|
|
"owl-blogs/config"
|
2023-07-17 18:44:59 +00:00
|
|
|
"owl-blogs/domain/model"
|
|
|
|
)
|
|
|
|
|
2023-07-19 18:25:42 +00:00
|
|
|
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)
|
|
|
|
}
|
2023-07-19 18:25:42 +00:00
|
|
|
return siteConfig
|
2023-07-17 18:44:59 +00:00
|
|
|
}
|