import { Express } from 'express';
import healthRouter from './health';
import klipyRouter from './klipy';
import linkMetadataRouter from './link-metadata';
import gamesRouter from './games';
import proxyRouter from './proxy';
import usersRouter from './users';
import deviceTokensRouter from './device-tokens';
import serversRouter from './servers';
import pluginSupportRouter from './plugin-support';
import openApiDocsRouter from './openapi-docs';
import joinRequestsRouter from './join-requests';
import { invitesApiRouter, invitePageRouter } from './invites';

export function registerRoutes(app: Express): void {
  app.use('/api', healthRouter);
  app.use('/api', klipyRouter);
  app.use('/api', linkMetadataRouter);
  app.use('/api/games', gamesRouter);
  app.use('/api', proxyRouter);
  app.use('/api/users', usersRouter);
  app.use('/api/users/device-tokens', deviceTokensRouter);
  app.use('/api', openApiDocsRouter);
  app.use('/api/servers', pluginSupportRouter);
  app.use('/api/servers', serversRouter);
  app.use('/api/invites', invitesApiRouter);
  app.use('/api/requests', joinRequestsRouter);
  app.use('/invite', invitePageRouter);
}
