Compare commits

..

No commits in common. "36ae90b7af5f2ccc08a27e2eadcc6415b5f38482" and "3ca91288d2d24a41b950232cf5962a0cd32bcf3d" have entirely different histories.

6 changed files with 4 additions and 87 deletions

View file

@ -30,7 +30,7 @@ const emoteModel = require('../emoteSchema');
const channelPermissionSchema = require('./channelPermissionSchema');
const channelBanSchema = require('./channelBanSchema');
const queuedMediaSchema = require('./media/queuedMediaSchema');
const playlistSchema = require('./media/playlist/playlistSchema');
const playlistSchema = require('./media/playlistSchema');
const chatSchema = require('./chatSchema');
//Utils
const { exceptionHandler, errorHandler } = require('../../utils/loggerUtils');

View file

@ -1,40 +0,0 @@
/*Canopy - The next generation of stoner streaming software
Copyright (C) 2024-2025 Rainbownapkin and the TTN Community
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.*/
//NPM Imports
const {mongoose} = require('mongoose');
//Local Imports
const playlistSchema = require('./playlistSchema');
/**
* DB Schema for Documents representing channel playlists
*/
const channelPlaylistProperties = new mongoose.Schema({
channel: {
type: mongoose.SchemaTypes.ObjectID,
ref: "channel",
required: true
}
},
{
discriminatorKey: 'location'
});
//Create 'channelPlaylistSchema' as descriminator of playlistSchema
var channelPlaylistSchema = playlistSchema.discriminator('channel', channelPlaylistProperties);
//Export mongoose model based on channelPlaylistSchema
module.exports = mongoose.model("channelPlaylists", channelPlaylistSchema);

View file

@ -1,40 +0,0 @@
/*Canopy - The next generation of stoner streaming software
Copyright (C) 2024-2025 Rainbownapkin and the TTN Community
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.*/
//NPM Imports
const {mongoose} = require('mongoose');
//Local Imports
const playlistSchema = require('./playlistSchema');
/**
* DB Schema for Documents representing user playlists
*/
const userPlaylistProperties = new mongoose.Schema({
user:{
type: mongoose.SchemaTypes.ObjectID,
ref: "user",
required: true
}
},
{
discriminatorKey: 'location'
});
//Create 'userPlaylistSchema' as descriminator of playlistSchema
var userPlaylistSchema = playlistSchema.discriminator('user', userPlaylistProperties);
//Export mongoose model based on userPlaylistSchema
module.exports = mongoose.model("userPlaylists", userPlaylistSchema);

View file

@ -18,8 +18,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
const {mongoose} = require('mongoose');
//Local Imports
const mediaSchema = require('../mediaSchema');
const media = require('../../../../app/channel/media/media');
const mediaSchema = require('./mediaSchema');
const media = require('../../../app/channel/media/media');
/**
* DB Schema for documents represnting a piece of media held in a playlist

View file

@ -34,9 +34,6 @@ const playlistSchema = new mongoose.Schema({
required: false,
default: []
}]
},
{
discriminatorKey: 'location'
});
//methods

View file

@ -27,7 +27,7 @@ const flairModel = require('../flairSchema');
const permissionModel = require('../permissionSchema');
const emoteModel = require('../emoteSchema');
const emailChangeModel = require('./emailChangeSchema');
const playlistSchema = require('../channel/media/playlist/playlistSchema');
const playlistSchema = require('../channel/media/playlistSchema');
const rememberMeModel = require('./rememberMeSchema');
//Utils
const hashUtil = require('../../utils/hashUtils');