From 1ccbe82d64af7382bc386abfdf758888fdf7139a Mon Sep 17 00:00:00 2001 From: chyoo Date: Mon, 13 Jul 2026 10:49:00 +0900 Subject: [PATCH] add provision session --- src/routes/lms.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/routes/lms.ts b/src/routes/lms.ts index 3973777..bff0c44 100644 --- a/src/routes/lms.ts +++ b/src/routes/lms.ts @@ -1,4 +1,5 @@ import { Hono } from 'hono' +import type { Context } from 'hono' import { z } from 'zod' import { config } from '../config' import { agentClient } from '../services/agent-client' @@ -46,7 +47,7 @@ lmsRoutes.use('/lms/*', async (c, next) => { return next() }) -lmsRoutes.post('/lms/platform-sessions', async (c) => { +async function createPlatformSession(c: Context) { const body = sessionSchema.safeParse(await c.req.json().catch(() => null)) if (!body.success) return c.json({ error: 'invalid_body', issues: body.error.flatten() }, 400) @@ -78,7 +79,9 @@ lmsRoutes.post('/lms/platform-sessions', async (c) => { } throw error } -}) +} + +lmsRoutes.post('/lms/platform-sessions', createPlatformSession) lmsRoutes.get('/lms/agents', async (c) => { const accountEmail = c.req.query('accountEmail') || undefined