imseldrith's picture
Initial upload from Colab
9e27976 verified
raw
history blame contribute delete
350 Bytes
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)
}
})