Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
update count + og:title
Browse files
src/routes/api/models/+server.ts
CHANGED
@@ -84,18 +84,9 @@ export async function GET(request : RequestEvent) {
|
|
84 |
take: limit,
|
85 |
})
|
86 |
|
87 |
-
const total_reposId = await prisma.model.count({
|
88 |
-
where: {
|
89 |
-
...(IS_ADMIN ? {} : { isPublic: true }),
|
90 |
-
OR: [
|
91 |
-
{ id: { contains: search } },
|
92 |
-
]
|
93 |
-
},
|
94 |
-
})
|
95 |
-
|
96 |
return json({
|
97 |
cards,
|
98 |
-
total_items:
|
99 |
})
|
100 |
}
|
101 |
|
|
|
84 |
take: limit,
|
85 |
})
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
return json({
|
88 |
cards,
|
89 |
+
total_items: cards?.length
|
90 |
})
|
91 |
}
|
92 |
|
src/routes/models/+layout.svelte
CHANGED
@@ -86,6 +86,8 @@
|
|
86 |
{#if $page.url.searchParams.get('search')}
|
87 |
<meta property="og:title" content="All {$page.url.searchParams.get('search')} LoRAS on LoRA Studio" />
|
88 |
<meta property="og:description" content="Browse and explore all {$page.url.searchParams.get('search')} models" />
|
|
|
|
|
89 |
{/if}
|
90 |
</svelte:head>
|
91 |
|
|
|
86 |
{#if $page.url.searchParams.get('search')}
|
87 |
<meta property="og:title" content="All {$page.url.searchParams.get('search')} LoRAS on LoRA Studio" />
|
88 |
<meta property="og:description" content="Browse and explore all {$page.url.searchParams.get('search')} models" />
|
89 |
+
{:else if $page.url.searchParams.get('base_model')}
|
90 |
+
<meta property="og:title" content="Explore {$page.url.searchParams.get('base_model')?.toLocaleUpperCase()} LoRAs" />
|
91 |
{/if}
|
92 |
</svelte:head>
|
93 |
|