Add basic typescript lib

This commit is contained in:
David Corbitt
2023-08-06 17:29:06 -07:00
parent 109a9ddb1e
commit a53d70d8b2
31 changed files with 2126 additions and 325 deletions

View File

@@ -8,6 +8,7 @@ import { evaluationsRouter } from "./routers/evaluations.router";
import { worldChampsRouter } from "./routers/worldChamps.router";
import { datasetsRouter } from "./routers/datasets.router";
import { datasetEntries } from "./routers/datasetEntries.router";
import { externalApiRouter } from "./routers/externalApi.router";
/**
* This is the primary router for your server.
@@ -24,6 +25,7 @@ export const appRouter = createTRPCRouter({
worldChamps: worldChampsRouter,
datasets: datasetsRouter,
datasetEntries: datasetEntries,
externalApi: externalApiRouter,
});
// export type definition of API

View File

@@ -64,7 +64,7 @@ export const createTRPCContext = async (opts: CreateNextContextOptions) => {
// Get the session from the server using the getServerSession wrapper function
const session = await getServerAuthSession({ req, res });
const apiKey = req.headers["x-openpipe-api-key"] as string | null;
const apiKey = req.headers["X-Openpipe-Api-Key"] as string | null;
console.log('api key is', apiKey)