Redirect added after channel creation.
This commit is contained in:
parent
17e736ab1a
commit
567eb5b574
6 changed files with 16 additions and 20 deletions
|
|
@ -229,7 +229,20 @@ channelSchema.statics.register = async function(channelObj, ownerObj){
|
|||
rank: "admin"
|
||||
}];
|
||||
|
||||
const newChannel = await this.create((thumbnail ? {id, name, description, thumbnail, rankList} : {id, name, description, rankList}));
|
||||
const newChannelObj = {
|
||||
id,
|
||||
name,
|
||||
description,
|
||||
thumbnail,
|
||||
rankList,
|
||||
media: {
|
||||
nowPlaying: null,
|
||||
scheduledMedia: [],
|
||||
archived: []
|
||||
}
|
||||
};
|
||||
|
||||
const newChannel = await this.create(newChannelObj);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ const playlistMediaProperties = new mongoose.Schema({
|
|||
uuid: {
|
||||
type: mongoose.SchemaTypes.UUID,
|
||||
required:true,
|
||||
unique: true,
|
||||
default: crypto.randomUUID()
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ const playlistSchema = new mongoose.Schema({
|
|||
name: {
|
||||
type: mongoose.SchemaTypes.String,
|
||||
required: true,
|
||||
unique: true
|
||||
},
|
||||
media: [playlistMediaSchema],
|
||||
defaultTitles:[{
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ const queuedProperties = new mongoose.Schema({
|
|||
uuid: {
|
||||
type: mongoose.SchemaTypes.UUID,
|
||||
required: true,
|
||||
unique: true
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue