From 2ca1201a4dcc3c5e0bae1d622f74206da52d588c Mon Sep 17 00:00:00 2001 From: Ethan Niser Date: Thu, 14 Sep 2023 00:04:32 -0500 Subject: [PATCH] rename and swagger --- src/main.tsx | 7 ++++--- src/services/todos.tsx | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) 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", })