name limits

This commit is contained in:
peterino2 2026-02-03 20:44:04 -08:00
parent 4ae6004239
commit 16774a4156
2 changed files with 4 additions and 0 deletions

View File

@ -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";

View File

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