Build & Deploy / build-and-push (backend) (push) Failing after 35s
Build & Deploy / build-and-push (discord-gateway) (push) Failing after 25s
Build & Deploy / build-and-push (proxy) (push) Failing after 25s
- Remove pnpm workspace, moon repo, and all monorepo tooling - Delete packages/shared/, embed shared code directly into each service - Copy packages/shared/src/* -> services/backend/src/shared/ and services/discord-gateway/src/shared/ - Replace all @bete/shared imports with @/shared/ path alias - Remove @bete/shared workspace dependency from both services - Update root package.json scripts from --filter to --prefix - Rewrite Dockerfiles to build each service standalone - Clean up biome.json, .gitignore, remove root drizzle.config.ts
28 lines
913 B
TypeScript
28 lines
913 B
TypeScript
import { createChildLogger } from "@/shared/logger/index";
|
|
import type { Request, Response, Router } from "express";
|
|
import express from "express";
|
|
import { asyncHandler } from "../../shared/middlewares/index.js";
|
|
import { analysisService } from "./analysis.service.js";
|
|
|
|
const logger = createChildLogger("analysis.routes");
|
|
|
|
export function createAnalysisRouter(): Router {
|
|
const router = express.Router();
|
|
|
|
// GET /api/analysis/search
|
|
router.get(
|
|
"/analysis/search",
|
|
asyncHandler(async (req: Request, res: Response) => {
|
|
const q = (req.query.q as string) || "";
|
|
const channelId = (req.query.channelId as string) || undefined;
|
|
const limit = Number(req.query.limit) || 20;
|
|
|
|
logger.debug({ q, channelId, limit }, "Analysis search requested");
|
|
const result = await analysisService.search({ q, channelId, limit });
|
|
res.json(result);
|
|
}),
|
|
);
|
|
|
|
return router;
|
|
}
|