diff --git a/backend/agent-manager.ts b/backend/agent-manager.ts index 3d57a53..e5374de 100644 --- a/backend/agent-manager.ts +++ b/backend/agent-manager.ts @@ -114,15 +114,7 @@ export class AgentManager { */ async update(friendlyname : string, updatedFriendlyName : string) { - let bean = await R.findOne("agent", " friendlyname = ? ", [ - friendlyname, - ]); - - if (bean) { - bean.friendlyname = updatedFriendlyName; - } else { - throw new Error("Friendly name could not be updated "); - } + await R.exec('UPDATE agent SET friendlyname = "' + updatedFriendlyName + '" WHERE friendlyname = "' + friendlyname + '"'); } connect(url : string, username : string, password : string) {