diff --git a/src/main.tsx b/src/main.tsx index 7a7b205..2142804 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,16 +1,17 @@ import { Elysia } from "elysia"; import { swagger } from "@elysiajs/swagger"; import { staticPlugin } from "@elysiajs/static"; -import { todosController } from "./services/todos"; +import { todosService } from "./services/todos"; import { BaseHtml } from "./components/base"; import Html from "@kitajs/html"; const app = new Elysia({ name: "@app/main", }) - // .use(swagger()) + // @ts-expect-error idk why this is broken + .use(swagger()) .use(staticPlugin()) - .use(todosController) + .use(todosService) .get("/", ({ html }) => html( diff --git a/src/services/todos.tsx b/src/services/todos.tsx index 4f6df12..830e2ed 100644 --- a/src/services/todos.tsx +++ b/src/services/todos.tsx @@ -6,7 +6,7 @@ import Html from "@kitajs/html"; import { db } from "../db"; import { eq } from "drizzle-orm"; -export const todosController = new Elysia({ +export const todosService = new Elysia({ name: "@app/todos", prefix: "/todos", })