Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/middleware/rateLimit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
type RateLimitContext,
} from "../services/auditService";
import { env } from "../config/env";
import { logger } from "../config/logger";

declare global {
namespace Express {
Expand Down
6 changes: 0 additions & 6 deletions src/routes/markets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import { accessLog } from "../../middleware/accessLog";
import { marketsCors } from "../../middleware/cors";
import { listFeaturedMarkets } from "../../services/marketFeatureService";
import { logger } from "../../config/logger";
import type { Request, Response, NextFunction } from "express";
const trackMarketsMetrics = (_name: string) => (_req: Request, _res: Response, next: NextFunction) => next();
import { RouteErrorFactory } from "../../errors";
import { conditionalGet } from "../../middleware/etag";
import { recommendationsRouter } from "./recommendations";
Expand All @@ -37,10 +35,6 @@ import {
createMarketBodySchema,
} from "../../validators/markets";

function trackMarketsMetrics(_action: string) {
return (_req: any, _res: any, next: any) => next();
}

export const marketsRouter = Router();

/**
Expand Down
6 changes: 5 additions & 1 deletion src/routes/tags.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { Router } from "express";
import type { Request, Response, NextFunction } from "express";
import { z } from "zod";
import { accessLog } from "../middleware/accessLog";
import { logger } from "../config/logger";
import { getMarketTags } from "../repositories/marketRepository";

export const tagsRouter = Router();
tagsRouter.use(accessLog);
Expand Down Expand Up @@ -45,7 +49,7 @@ const tagsQuerySchema = z.object({
* $ref: '#/components/schemas/ErrorResponse'
*/
tagsRouter.get("/", async (req: Request, res: Response, next: NextFunction) => {
const reqId = String((req as any).id ?? "anon");
const reqId = String((req as Request & { id?: unknown }).id ?? "anon");
try {
const parsed = tagsQuerySchema.safeParse(req.query);
if (!parsed.success) {
Expand Down
Loading
Loading