Build & Deploy / build-and-push (discord-gateway) (push) Failing after 30s
Build & Deploy / build-and-push (backend) (push) Failing after 2m28s
Build & Deploy / build-and-push (proxy) (push) Successful in 2m28s
- Backend: mascot-chat module → chatbot, routes /mascot/chat → /chat - Shared schema: pgMascotChatMessagesTable → pgChatbotMessagesTable - Frontend: MascotProvider/useMascot → ChatbotProvider/useChatbot - Gateway schema: update exports to match shared schema - Docs: update all .md references (CLAUDE.md, README, specs, plans) - All API routes, controller names, service classes, types renamed Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
23 lines
582 B
TypeScript
23 lines
582 B
TypeScript
import express, { type Router } from "express";
|
|
import { validateBody } from "../../shared/middlewares/index.js";
|
|
import {
|
|
clearChatbotHistory,
|
|
getChatbotHistory,
|
|
handleChatbotChat,
|
|
} from "./chatbot.controller.js";
|
|
import { chatRequestSchema } from "./chatbot.schema.js";
|
|
|
|
export function createChatbotRouter(): Router {
|
|
const router = express.Router();
|
|
|
|
router.post(
|
|
"/chat",
|
|
validateBody(chatRequestSchema),
|
|
handleChatbotChat,
|
|
);
|
|
router.get("/chat/history", getChatbotHistory);
|
|
router.delete("/chat/history", clearChatbotHistory);
|
|
|
|
return router;
|
|
}
|