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[];