web/admin: fix access token list calling wrong API (cherry-pick #10434) (#10435)

web/admin: fix access token list calling wrong API (#10434)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens L <jens@goauthentik.io>
This commit is contained in:
gcp-cherry-pick-bot[bot]
2024-07-10 14:17:47 +02:00
committed by GitHub
parent 3fe129e107
commit 3f663cab0f

View File

@ -66,15 +66,15 @@ export class UserOAuthAccessTokenList extends Table<TokenModel> {
renderToolbarSelected(): TemplateResult {
const disabled = this.selectedElements.length < 1;
return html`<ak-forms-delete-bulk
objectLabel=${msg("Refresh Tokens(s)")}
objectLabel=${msg("Access Tokens(s)")}
.objects=${this.selectedElements}
.usedBy=${(item: ExpiringBaseGrantModel) => {
return new Oauth2Api(DEFAULT_CONFIG).oauth2RefreshTokensUsedByList({
return new Oauth2Api(DEFAULT_CONFIG).oauth2AccessTokensUsedByList({
id: item.pk,
});
}}
.delete=${(item: ExpiringBaseGrantModel) => {
return new Oauth2Api(DEFAULT_CONFIG).oauth2RefreshTokensDestroy({
return new Oauth2Api(DEFAULT_CONFIG).oauth2AccessTokensDestroy({
id: item.pk,
});
}}