Skip to content
This repository was archived by the owner on Jul 15, 2022. It is now read-only.

Commit 5b9c80b

Browse files
author
Leonardo Chaia
committed
fix: use v2/ instead of catalog for testing registries
1 parent e3c24d7 commit 5b9c80b

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/app/registry/registry-auth.service.ts

+9-5
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,17 @@ export class RegistryAuthService {
3131
Authorization: `Basic ${basic}`
3232
};
3333
}
34+
const params: any = {
35+
service: service,
36+
clientId: clientId,
37+
};
38+
if (scope) {
39+
params.scope = scope;
40+
}
41+
3442
return this.httpClient.get<{ token: string }>(url,
3543
{
36-
params: {
37-
service: service,
38-
scope: scope,
39-
clientId: clientId,
40-
},
44+
params: params,
4145
headers: headers
4246
}).pipe(map(r => {
4347
return r.token;

src/app/registry/registry.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class RegistryService {
3030
}
3131

3232
public testRegistrySettings(settings: DockerRegistrySettings) {
33-
return this.get<void>(settings, `v2/_catalog`, { n: '1' });
33+
return this.get<void>(settings, `v2/`);
3434
}
3535

3636
protected get<T>(registrySettings: DockerRegistrySettings,

0 commit comments

Comments
 (0)