Skip to content

Commit

Permalink
NAS-130838: API Keys deletion is not working (#10573)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKarpov98 authored Aug 29, 2024
1 parent 52635e2 commit 044e136
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/interfaces/api/api-call-directory.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export interface ApiCallDirectory {

// API Key
'api_key.create': { params: [CreateApiKeyRequest]; response: ApiKey };
'api_key.delete': { params: [id: string]; response: boolean };
'api_key.delete': { params: [id: number]; response: boolean };
'api_key.query': { params: QueryParams<ApiKey>; response: ApiKey[] };
'api_key.update': { params: UpdateApiKeyRequest; response: ApiKey };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ describe('ApiKeyListComponent', () => {
message: 'Are you sure you want to delete the <b>first-api-key</b> API Key?',
});

expect(spectator.inject(WebSocketService).call).toHaveBeenCalledWith('api_key.delete', ['1']);
expect(spectator.inject(WebSocketService).call).toHaveBeenCalledWith('api_key.delete', [1]);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class ApiKeyListComponent implements OnInit {
}).pipe(
filter(Boolean),
tap(() => this.loader.open()),
switchMap(() => this.ws.call('api_key.delete', [String(apiKey.id)])),
switchMap(() => this.ws.call('api_key.delete', [apiKey.id])),
untilDestroyed(this),
).subscribe({
next: () => this.store.apiKeyDeleted(apiKey.id),
Expand Down

0 comments on commit 044e136

Please sign in to comment.