MCPcopy Index your code
hub / github.com/TruthHun/BookStack / initAPI

Function initAPI

models/api.go:18–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16)
17
18func initAPI() {
19 if strings.ToLower(utils.StoreType) == utils.StoreOss {
20 staticDomain = strings.TrimSpace(beego.AppConfig.String("oss::Domain"))
21 }
22
23 if strings.TrimRight(staticDomain, "/") == "" {
24 staticDomain = beego.AppConfig.DefaultString("static_domain", "")
25 }
26
27 staticDomain = strings.TrimRight(staticDomain, "/") + "/"
28}
29
30func GetAPIStaticDomain() string {
31 return staticDomain

Callers 1

InitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected