Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
adityachoudhari26 committed Nov 22, 2024
1 parent 79f5b38 commit 7ae4a38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/pty-proxy/src/controller/agent-socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class AgentSocket {
"name" | "version" | "kind" | "identifier" | "workspaceId"
>,
) {
const [res] = await upsertResources(db, [
const { updated } = await upsertResources(db, [
{
...resource,
name: this.name,
Expand All @@ -136,6 +136,7 @@ export class AgentSocket {
updatedAt: new Date(),
},
]);
const res = updated.at(0);
if (res == null) throw new Error("Failed to create resource");
this.resource = res;
agents.set(res.id, { lastSync: new Date(), agent: this });
Expand Down

0 comments on commit 7ae4a38

Please sign in to comment.