fix: remove unused roles variable, lint and format
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,20 @@
|
|||||||
import { builder } from "../builder";
|
import { builder } from "../builder";
|
||||||
import { ArticleType, ArticleListType, AdminArticleListType } from "../types/index";
|
import { ArticleType, ArticleListType, AdminArticleListType } from "../types/index";
|
||||||
import { articles, users } from "../../db/schema/index";
|
import { articles, users } from "../../db/schema/index";
|
||||||
import { eq, and, lte, desc, asc, ilike, or, count, arrayContains, isNotNull, ne, type SQL } from "drizzle-orm";
|
import {
|
||||||
|
eq,
|
||||||
|
and,
|
||||||
|
lte,
|
||||||
|
desc,
|
||||||
|
asc,
|
||||||
|
ilike,
|
||||||
|
or,
|
||||||
|
count,
|
||||||
|
arrayContains,
|
||||||
|
isNotNull,
|
||||||
|
ne,
|
||||||
|
type SQL,
|
||||||
|
} from "drizzle-orm";
|
||||||
import { requireAdmin } from "../../lib/acl";
|
import { requireAdmin } from "../../lib/acl";
|
||||||
import type { DB } from "../../db/connection";
|
import type { DB } from "../../db/connection";
|
||||||
|
|
||||||
|
|||||||
@@ -307,9 +307,7 @@ const ARTICLE_CATEGORIES_QUERY = gql`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export async function getArticleCategories(
|
export async function getArticleCategories(fetchFn?: typeof globalThis.fetch): Promise<string[]> {
|
||||||
fetchFn?: typeof globalThis.fetch,
|
|
||||||
): Promise<string[]> {
|
|
||||||
return loggedApiCall("getArticleCategories", async () => {
|
return loggedApiCall("getArticleCategories", async () => {
|
||||||
const data = await getGraphQLClient(fetchFn).request<{ articleCategories: string[] }>(
|
const data = await getGraphQLClient(fetchFn).request<{ articleCategories: string[] }>(
|
||||||
ARTICLE_CATEGORIES_QUERY,
|
ARTICLE_CATEGORIES_QUERY,
|
||||||
|
|||||||
@@ -27,8 +27,6 @@
|
|||||||
|
|
||||||
const currentUserId = page.data.authStatus?.user?.id;
|
const currentUserId = page.data.authStatus?.user?.id;
|
||||||
|
|
||||||
const roles = ["", "viewer", "model"] as const;
|
|
||||||
|
|
||||||
function debounceSearch(value: string) {
|
function debounceSearch(value: string) {
|
||||||
clearTimeout(searchTimeout);
|
clearTimeout(searchTimeout);
|
||||||
searchTimeout = setTimeout(() => {
|
searchTimeout = setTimeout(() => {
|
||||||
|
|||||||
@@ -196,7 +196,9 @@
|
|||||||
<div
|
<div
|
||||||
class="absolute inset-0 bg-gradient-to-t from-black/60 to-transparent flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity"
|
class="absolute inset-0 bg-gradient-to-t from-black/60 to-transparent flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity"
|
||||||
>
|
>
|
||||||
<div class="w-12 h-12 bg-primary/90 rounded-full flex items-center justify-center">
|
<div
|
||||||
|
class="w-12 h-12 bg-primary/90 rounded-full flex items-center justify-center"
|
||||||
|
>
|
||||||
<span class="icon-[ri--play-large-fill] w-6 h-6 text-white ml-0.5"></span>
|
<span class="icon-[ri--play-large-fill] w-6 h-6 text-white ml-0.5"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -253,11 +255,8 @@
|
|||||||
class="w-16 h-12 object-cover rounded"
|
class="w-16 h-12 object-cover rounded"
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<div
|
<div class="w-16 h-12 rounded bg-muted/50 flex items-center justify-center">
|
||||||
class="w-16 h-12 rounded bg-muted/50 flex items-center justify-center"
|
<span class="icon-[ri--article-line] w-4 h-4 text-muted-foreground"
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="icon-[ri--article-line] w-4 h-4 text-muted-foreground"
|
|
||||||
></span>
|
></span>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -460,9 +460,7 @@
|
|||||||
class="w-24 h-16 object-cover rounded"
|
class="w-24 h-16 object-cover rounded"
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<div
|
<div class="w-24 h-16 rounded bg-muted/50 flex items-center justify-center">
|
||||||
class="w-24 h-16 rounded bg-muted/50 flex items-center justify-center"
|
|
||||||
>
|
|
||||||
<span class="icon-[ri--film-line] w-5 h-5 text-muted-foreground"></span>
|
<span class="icon-[ri--film-line] w-5 h-5 text-muted-foreground"></span>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user