Skip to content

Commit

Permalink
use new RegistryV2RequestOptions for azure requests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexyaang committed Sep 14, 2023
1 parent 4e6aa8a commit d3da812
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions src/tree/registries/Azure/AzureRegistryDataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,10 @@ export class AzureRegistryDataProvider extends RegistryV2DataProvider implements

public async deleteRepository(item: AzureRepository): Promise<void> {
const authenticationProvider = this.getAuthenticationProvider(item.parent as unknown as AzureRegistryItem);

const requestUrl = item.baseUrl.with({ path: `v2/_acr/${item.label}/repository` });
const reponse = await registryV2Request({
method: 'DELETE',
registryUri: item.baseUrl,
path: ['v2', '_acr', `${item.label}`, 'repository'],
requestUri: requestUrl,
scopes: [`repository:${item.label}:delete`],
authenticationProvider: authenticationProvider,
});
Expand All @@ -181,11 +180,10 @@ export class AzureRegistryDataProvider extends RegistryV2DataProvider implements

public async untagImage(item: AzureTag): Promise<void> {
const authenticationProvider = this.getAuthenticationProvider(item.parent.parent as unknown as AzureRegistryItem);

const requestUrl = item.baseUrl.with({ path: `v2/_acr/${item.parent.label}/tags/${item.label}` });
const reponse = await registryV2Request({
method: 'DELETE',
registryUri: item.baseUrl,
path: ['v2', '_acr', `${item.parent.label}`, 'tags', `${item.label}`],
requestUri: requestUrl,
scopes: [`repository:${item.parent.label}:delete`],
authenticationProvider: authenticationProvider,
});
Expand Down

0 comments on commit d3da812

Please sign in to comment.