From 16774a4156ab1e5767395abfabec4bbc81b1780d Mon Sep 17 00:00:00 2001 From: peterino2 Date: Tue, 3 Feb 2026 20:44:04 -0800 Subject: [PATCH] name limits --- public/channelSync.js | 1 + server.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/public/channelSync.js b/public/channelSync.js index 9dff468..92d1003 100644 --- a/public/channelSync.js +++ b/public/channelSync.js @@ -87,6 +87,7 @@ input.type = "text"; input.className = "new-channel-input"; input.placeholder = "Channel name..."; + input.maxLength = 64; const submit = document.createElement("button"); submit.className = "btn-submit-channel"; diff --git a/server.ts b/server.ts index 0d56eed..2e195d2 100644 --- a/server.ts +++ b/server.ts @@ -401,6 +401,9 @@ serve({ if (!name || typeof name !== "string" || name.trim().length === 0) { return Response.json({ error: "Name is required" }, { status: 400 }); } + if (name.trim().length > 64) { + return Response.json({ error: "Name must be 64 characters or less" }, { status: 400 }); + } // Build track list from trackIds or default to full library let tracks: Track[];