Update etapi.js

This commit is contained in:
mechanarchy 2023-06-10 17:36:23 +10:00 committed by GitHub
parent c177aaa901
commit b97ebe9f03
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});