Finished up with improvements to error handling.

This commit is contained in:
rainbow napkin 2025-04-29 07:05:38 -04:00
parent a6228a9fd9
commit 23ceb74883
8 changed files with 128 additions and 40 deletions

View file

@ -49,7 +49,8 @@ const channelSchema = new mongoose.Schema({
description: {
type: mongoose.SchemaTypes.String,
required: true,
maxLength: 1000,
//Calculate max length by the validator max length and the size of an escaped character
maxLength: 1000 * 6,
default: 0
},
thumbnail: {

View file

@ -26,7 +26,8 @@ const typeEnum = ["image", "video"];
const emoteSchema = new mongoose.Schema({
name:{
type: mongoose.SchemaTypes.String,
required: true
required: true,
maxLength: 14,
},
link:{
type: mongoose.SchemaTypes.String,