From 0af43496aab39e940520a30517474b92c537c746 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Sat, 11 Oct 2025 10:29:45 +0200 Subject: [PATCH 1/2] Update justfile --- justfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/justfile b/justfile index cf28da5..8f26f8b 100644 --- a/justfile +++ b/justfile @@ -23,6 +23,15 @@ test-api: dev: just _api-dev & (just _frontend-dev) + +push-and-create-pr: + git push && gh pr create --fill && gh pr checks + +view-checks: + gh pr checks + +merge-to-main: + gh pr merge -m # Types recipes From ab5e233d2224aea6b5e9b90db022431eff254f59 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Sat, 11 Oct 2025 10:31:03 +0200 Subject: [PATCH 2/2] Fix tablo api update --- api/src/tablo.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/api/src/tablo.ts b/api/src/tablo.ts index 80ea9d3..0bbf7ba 100644 --- a/api/src/tablo.ts +++ b/api/src/tablo.ts @@ -133,7 +133,7 @@ tabloRouter.post("/create-and-invite", async (c) => { .single(); if (ownerError || !ownerData || invitedUserError || !invitedUser) { - return c.json({ error: "owner_id is incorrect" }, 400); + return c.json({ error: "owner_id or invited_user_id is incorrect" }, 400); } const ownerDataTyped = ownerData as { @@ -306,15 +306,24 @@ tabloRouter.patch("/update", async (c) => { const updatedTablo = update as Tables<"tablos">; + const isUpdatingName = + tablo.name !== undefined && tablo.name !== updatedTablo.name; + if (error) { return c.json({ error: error.message }, 500); } - const channel = streamServerClient.channel("messaging", updatedTablo.id); - await channel.update({ - // @ts-ignore - name: updatedTablo.name, - }); + if (isUpdatingName) { + const channel = streamServerClient.channel("messaging", updatedTablo.id); + try { + await channel.update({ + // @ts-ignore + name: updatedTablo.name, + }); + } catch (error) { + console.error("error updating channel", error); + } + } return c.json({ message: "Tablo updated successfully" }); });