+1
-4
app/(home-pages)/tag/[tag]/getDocumentsByTag.ts
+1
-4
app/(home-pages)/tag/[tag]/getDocumentsByTag.ts
···
10
10
export async function getDocumentsByTag(
11
11
tag: string,
12
12
): Promise<{ posts: Post[] }> {
13
-
// Normalize tag to lowercase for case-insensitive search
14
-
const normalizedTag = tag.toLowerCase();
15
-
16
13
// Query documents that have this tag
17
14
const { data: documents, error } = await supabaseServerClient
18
15
.from("documents")
···
22
19
document_mentions_in_bsky(count),
23
20
documents_in_publications(publications(*))`,
24
21
)
25
-
.contains("data->tags", `["${normalizedTag}"]`)
22
+
.contains("data->tags", `["${tag}"]`)
26
23
.order("indexed_at", { ascending: false })
27
24
.limit(50);
28
25