feat: add BuildSubdomain helper

This commit is contained in:
Derrick Hammer 2024-03-17 09:01:28 -04:00
parent 2a8c036dc6
commit b4b211d003
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 0 deletions

View File

@ -93,3 +93,7 @@ func (hs *APIRouter) SetLogger(logger *zap.Logger) {
func (hs *APIRouter) SetConfig(config *config.Manager) { func (hs *APIRouter) SetConfig(config *config.Manager) {
hs.config = config hs.config = config
} }
func BuildSubdomain(api RoutableAPI, cfg *config.Manager) string {
return api.Name() + "." + cfg.Config().Core.Domain
}