Spaces:
Running
Running
File size: 350 Bytes
9e27976 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import { Hono } from "hono"
import { state } from "~/lib/state"
export const tokenRoute = new Hono()
tokenRoute.get("/", (c) => {
try {
return c.json({
token: state.copilotToken,
})
} catch (error) {
console.error("Error fetching token:", error)
return c.json({ error: "Failed to fetch token", token: null }, 500)
}
})
|