Skip to content

Commit 71e5875

Browse files
authored
fix(tags): use parsePaginationParam to clamp popular-tags limit (#377)
Replaces ad-hoc Math.min/Math.max/parseInt with parsePaginationParam so limit=0 clamps to 1, malformed values fall back to 50, and oversized values cap at 200. Fixes #360
1 parent d5cdc90 commit 71e5875

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/app/api/tags/popular/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { parsePaginationParam } from "@/lib/api-pagination";
12
import { NextRequest, NextResponse } from "next/server";
23
import { createClient } from "@/lib/supabase/server";
34
import { parsePaginationParam } from "@/lib/api-pagination";

0 commit comments

Comments
 (0)