Merge pull request #4019 from mechanarchy/patch-2

Fix attempted ETAPI token rename after cancel
This commit is contained in:
zadam 2023-06-12 23:21:13 +02:00 committed by GitHub
commit fbc805a221
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,6 +109,10 @@ export default class EtapiOptions extends OptionsWidget {
message: "Please enter new token's name",
defaultValue: oldName
});
if(tokenName === null) {
return;
}
await server.patch(`etapi-tokens/${etapiTokenId}`, {name: tokenName});