add provision session
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-13 10:49:00 +09:00
parent 0a637d29d4
commit 1ccbe82d64
+5 -2
View File
@@ -1,4 +1,5 @@
import { Hono } from 'hono' import { Hono } from 'hono'
import type { Context } from 'hono'
import { z } from 'zod' import { z } from 'zod'
import { config } from '../config' import { config } from '../config'
import { agentClient } from '../services/agent-client' import { agentClient } from '../services/agent-client'
@@ -46,7 +47,7 @@ lmsRoutes.use('/lms/*', async (c, next) => {
return 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)) const body = sessionSchema.safeParse(await c.req.json().catch(() => null))
if (!body.success) return c.json({ error: 'invalid_body', issues: body.error.flatten() }, 400) 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 throw error
} }
}) }
lmsRoutes.post('/lms/platform-sessions', createPlatformSession)
lmsRoutes.get('/lms/agents', async (c) => { lmsRoutes.get('/lms/agents', async (c) => {
const accountEmail = c.req.query('accountEmail') || undefined const accountEmail = c.req.query('accountEmail') || undefined