diff --git a/src/data/db.ts b/src/data/db.ts index 0c08774..6271470 100644 --- a/src/data/db.ts +++ b/src/data/db.ts @@ -11,6 +11,7 @@ export function getRoomByID(id: string): RoomI | null { } }) .then((room) => { + //TODO NEED TO FILTER OUT CLAIMCODE REFERENCES return room; }) .catch((err) => console.error(err)); diff --git a/src/endpoints/index.ts b/src/endpoints/index.ts index 32cd921..eb415ec 100644 --- a/src/endpoints/index.ts +++ b/src/endpoints/index.ts @@ -1,13 +1,14 @@ +import type { Express } from 'express'; import { PrismaClient } from '@prisma/client'; import { serverConfig } from '../config/serverConfig'; import { pp } from '../utils.js'; import { getRoomByID } from '../data/db'; import { genId } from 'discreetly-interfaces'; -// TODO! Properly handle authentication for admin controls +// TODO! Properly handle authentication for admin endpoints // TODO api endpoint that creates new rooms and generates invite codes for them -export function initEndpoints(app) { +export function initEndpoints(app: Express) { const prisma = new PrismaClient(); app.get(['/', '/api'], (req, res) => {