Remove unnecessary code branches
This commit is contained in:
parent
e1a39d8e2b
commit
0bd4e034ef
1 changed files with 0 additions and 14 deletions
|
|
@ -47,13 +47,6 @@ func GraphQLEndpoint(hostname string) string {
|
|||
if isGarage(hostname) {
|
||||
return fmt.Sprintf("https://%s/api/graphql", hostname)
|
||||
}
|
||||
// Once we change Tenancy to no longer be treated as Enterprise, this
|
||||
// conditional can be removed as the flow will fall through to the bottom.
|
||||
// However, we can't do that until we've investigated all places in which
|
||||
// Tenancy is currently treated as Enterprise.
|
||||
if ghauth.IsTenancy(hostname) {
|
||||
return fmt.Sprintf("https://api.%s/graphql", hostname)
|
||||
}
|
||||
if ghauth.IsEnterprise(hostname) {
|
||||
return fmt.Sprintf("https://%s/api/graphql", hostname)
|
||||
}
|
||||
|
|
@ -67,13 +60,6 @@ func RESTPrefix(hostname string) string {
|
|||
if isGarage(hostname) {
|
||||
return fmt.Sprintf("https://%s/api/v3/", hostname)
|
||||
}
|
||||
// Once we change Tenancy to no longer be treated as Enterprise, this
|
||||
// conditional can be removed as the flow will fall through to the bottom.
|
||||
// However, we can't do that until we've investigated all places in which
|
||||
// Tenancy is currently treated as Enterprise.
|
||||
if ghauth.IsTenancy(hostname) {
|
||||
return fmt.Sprintf("https://api.%s/", hostname)
|
||||
}
|
||||
if ghauth.IsEnterprise(hostname) {
|
||||
return fmt.Sprintf("https://%s/api/v3/", hostname)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue