Skip to content

Commit

Permalink
Change
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenWeatherford committed Sep 11, 2018
1 parent 294dee6 commit 107ed35
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions explorer/models/customRegistryNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,8 @@ export class CustomRegistryNode extends NodeBase {

// Returns undefined if it's valid, otherwise returns an error message
public static async verifyIsValidRegistryUrl(registry: CustomRegistry): Promise<void> {
// If the call succeeds, it's a V2 registry
try {
// This is the correct official call
await registryRequest<{}>(registry.url, 'v2/', registry.credentials);
} catch {
// This this, too, just in case
await registryRequest<{}>(registry.url, 'v2', registry.credentials);
}
// If the call succeeds, it's a V2 registry (https://docs.docker.com/registry/spec/api/#api-version-check)
await registryRequest<{}>(registry.url, 'v2/', registry.credentials);
}

public async getChildren(element: CustomRegistryNode): Promise<CustomRepositoryNode[]> {
Expand Down

0 comments on commit 107ed35

Please sign in to comment.