Files
coolify/apps/api/src/routes/webhooks/traefik/index.ts
Andras Bacsai 49261308f7 update webhook
2023-07-25 12:00:31 +02:00

15 lines
600 B
TypeScript

import { FastifyPluginAsync } from 'fastify';
import { OnlyId } from '../../../types';
import { proxyConfiguration, otherProxyConfiguration } from './handlers';
import { OtherProxyConfiguration } from './types';
const root: FastifyPluginAsync = async (fastify): Promise<void> => {
fastify.get<OnlyId>('/main.json', async (request) => proxyConfiguration(request, false));
fastify.get<OnlyId>('/remote/:id', async (request) => proxyConfiguration(request, true));
fastify.get<OtherProxyConfiguration>('/other.json', async (request) =>
otherProxyConfiguration(request)
);
};
export default root;