MCPcopy Create free account
hub / github.com/Writesonic/GPTRouter / getActiveProviders

Function getActiveProviders

src/controllers/provider.controller.ts:13–24  ·  view source on GitHub ↗
(
  request: FastifyRequestTypebox<typeof GetAllProvidersSchema>,
  reply: FastifyReplyTypebox<typeof GetAllProvidersSchema>,
)

Source from the content-addressed store, hash-verified

11 * @returns {Promise<void>} The response from the active providers
12 */
13export const getActiveProviders = async (
14 request: FastifyRequestTypebox<typeof GetAllProvidersSchema>,
15 reply: FastifyReplyTypebox<typeof GetAllProvidersSchema>,
16) => {
17 try {
18 const response = await request.server.orm.getRepository(Provider).find();
19 reply.code(200).send(response);
20 } catch (e: any) {
21 Sentry.captureException(e);
22 reply.code(500).send(e);
23 }
24};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected