Add basic typescript lib
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user