renameServer changes

* Update doc error, regenerate docs
* Update a bad error message in renamePurchasedServer@serverPurchases.ts
* restore true/false return (removed in #450 due to miscommunication)
This commit is contained in:
omuretsu
2023-03-28 16:10:24 -04:00
parent eb8bcd00e3
commit 798da75d83
4 changed files with 12 additions and 5 deletions

View File

@@ -1270,7 +1270,13 @@ export const ns: InternalAPI<NSFull> = {
renamePurchasedServer: (ctx) => (_hostname, _newName) => {
const hostname = helpers.string(ctx, "hostname", _hostname);
const newName = helpers.string(ctx, "newName", _newName);
renamePurchasedServer(hostname, newName);
try {
renamePurchasedServer(hostname, newName);
return true;
} catch (err) {
helpers.log(ctx, () => String(err));
return false;
}
},
deleteServer: (ctx) => (_name) => {