From 5fef7575dea7937b408c2559f965d2138dbf2c05 Mon Sep 17 00:00:00 2001 From: Lucky3028 Date: Tue, 19 Sep 2023 00:06:46 +0900 Subject: [PATCH] refactor: re-export api --- apps/auto-run-ac-api/src/api/index.ts | 2 ++ apps/auto-run-ac-api/src/worker.ts | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 apps/auto-run-ac-api/src/api/index.ts diff --git a/apps/auto-run-ac-api/src/api/index.ts b/apps/auto-run-ac-api/src/api/index.ts new file mode 100644 index 0000000..272957b --- /dev/null +++ b/apps/auto-run-ac-api/src/api/index.ts @@ -0,0 +1,2 @@ +export { defaultTriggersApi } from './defaultTriggers'; +export { triggersApi } from './triggersApi'; diff --git a/apps/auto-run-ac-api/src/worker.ts b/apps/auto-run-ac-api/src/worker.ts index 7d79b63..78f0344 100644 --- a/apps/auto-run-ac-api/src/worker.ts +++ b/apps/auto-run-ac-api/src/worker.ts @@ -1,10 +1,7 @@ -import type { SharedEnv } from 'cloudflare-env'; import { OpenAPIHono } from '@hono/zod-openapi'; -import type { Env } from './model'; -import { defaultTriggersApi } from './api/defaultTriggers'; -import { triggersApi } from './api/triggersApi'; +import { defaultTriggersApi, triggersApi } from './api'; -const app = new OpenAPIHono<{ Bindings: SharedEnv & Env }>(); +const app = new OpenAPIHono(); app.doc('/doc', { openapi: '3.1.0',