mirror of
https://github.com/chrisbenincasa/tunarr.git
synced 2026-04-18 09:03:35 -04:00
* This is a nightmare * Checkpointing.... getting closer * First cut - packaging the server in a docker container * Remove busted bundles * Minify build * Some common commands for building - we're going to look into proper monorepo solutions soon * Remove dependency on serve-static * Add web serving, full-stack docker target, and Nvidia container support * Remove test action graph for now
30 lines
974 B
TypeScript
30 lines
974 B
TypeScript
import createLogger from '../../logger.js';
|
|
import { RouterPluginAsyncCallback } from '../../types/serverType.js';
|
|
import { channelsApiV2 } from './channelsApiV2.js';
|
|
import { customShowsApiV2 } from './customShowsApiV2.js';
|
|
import { debugApi } from './debugApi.js';
|
|
import { fillerListsApiV2 } from './fillerListsApiV2.js';
|
|
import { plexServerApiV2 } from './plexServersApiV2.js';
|
|
import { programmingApi } from './programmingApi.js';
|
|
import { tasksApiRouter } from './tasksApi.js';
|
|
|
|
const logger = createLogger(import.meta);
|
|
|
|
const registerV2Routes: RouterPluginAsyncCallback = async (f) => {
|
|
f.addHook('onError', (req, _, error, done) => {
|
|
logger.error(req.routeOptions.config.url, error);
|
|
done();
|
|
});
|
|
|
|
await f
|
|
.register(plexServerApiV2)
|
|
.register(tasksApiRouter)
|
|
.register(channelsApiV2)
|
|
.register(customShowsApiV2)
|
|
.register(fillerListsApiV2)
|
|
.register(programmingApi)
|
|
.register(debugApi);
|
|
};
|
|
|
|
export default registerV2Routes;
|