diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-11-24 13:29:53 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-11-24 13:29:53 +0300 |
commit | 5ffd39e41866614de47ff427d3156062a6879e1c (patch) | |
tree | 7c4b031596057329ca5dc3b7a406d2b631a11c7d /internal/source/domains.go | |
parent | bc61f03703dffb79c3d9d887385b968315362caa (diff) |
Respond with 502 if a domain can not be retrieved from a source
Diffstat (limited to 'internal/source/domains.go')
-rw-r--r-- | internal/source/domains.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/internal/source/domains.go b/internal/source/domains.go index 92bab663..f9dadef8 100644 --- a/internal/source/domains.go +++ b/internal/source/domains.go @@ -34,16 +34,10 @@ func NewDomains() *Domains { // sources here because it allows us to switch behavior and the domain source // for some subset of domains, to test / PoC the new GitLab Domains Source that // we plan to use to replace the disk source. -func (d *Domains) GetDomain(name string) *domain.Domain { +func (d *Domains) GetDomain(name string) (*domain.Domain, error) { return d.source(name).GetDomain(name) } -// HasDomain checks if domain exists. It is using new and the legacy domains -// source. -func (d *Domains) HasDomain(name string) bool { - return d.source(name).HasDomain(name) -} - // Start starts the disk domain source. It is DEPRECATED, because we want to // remove it entirely when disk source gets removed. func (d *Domains) Read(rootDomain string) { |