initial push from external dev branches

This commit is contained in:
iFlip721
2026-06-11 16:40:21 -04:00
parent 986e83632b
commit 245034a43a
182 changed files with 15465 additions and 0 deletions

22
server/dist/routes/channels.js vendored Normal file
View File

@@ -0,0 +1,22 @@
import { Router } from 'express';
import { Channel } from '../models/Channel.js';
import { SourceChannel } from '../models/SourceChannel.js';
export const channelsRouter = Router();
// GET /api/channels → legacy mock channels (drives the existing dashboard bootstrap)
// GET /api/channels?source=<id> → canonical normalized SourceChannel docs for a (Default) source
// playlist (the d-combine "path forward" contract, served over Mongo)
channelsRouter.get('/', async (req, res, next) => {
try {
const source = typeof req.query.source === 'string' ? req.query.source : null;
if (source) {
const docs = await SourceChannel.find({ source }).sort({ groupKey: 1, name: 1 }).lean();
return res.json(docs);
}
const docs = await Channel.find({}, { _id: 0 }).lean();
res.json(docs);
}
catch (err) {
next(err);
}
});
//# sourceMappingURL=channels.js.map