Finished up with improvements to error handling.
This commit is contained in:
parent
a6228a9fd9
commit
23ceb74883
8 changed files with 128 additions and 40 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue