feat(guides) : add safer publishing and discovery
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import "server-only";
|
||||
|
||||
import { and, asc, eq } from "drizzle-orm";
|
||||
import { asc, eq } from "drizzle-orm";
|
||||
|
||||
import { getDb } from "@/db";
|
||||
import {
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
import {
|
||||
glossaryAliasInputSchema,
|
||||
normalizeGlossaryAlias,
|
||||
type GlossaryKind,
|
||||
} from "@/lib/glossary";
|
||||
|
||||
const catalogTables = {
|
||||
@@ -53,10 +52,3 @@ export async function deleteGlossaryAlias(id: string) {
|
||||
if (!deleted) throw new Error("ไม่พบ Shortcut");
|
||||
return deleted;
|
||||
}
|
||||
|
||||
export async function aliasesForItem(kind: GlossaryKind, catalogKey: string) {
|
||||
return getDb().select().from(glossaryAliases).where(and(
|
||||
eq(glossaryAliases.kind, kind),
|
||||
eq(glossaryAliases.catalogKey, catalogKey),
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user