feat(guides) : add safer publishing and discovery
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import "server-only";
|
||||
|
||||
import { and, eq, isNull, sql } from "drizzle-orm";
|
||||
import { and, eq, isNull } from "drizzle-orm";
|
||||
import sharp from "sharp";
|
||||
|
||||
import { getDb } from "@/db";
|
||||
@@ -95,13 +95,6 @@ export async function uploadPublicMedia(
|
||||
};
|
||||
}
|
||||
|
||||
export async function addCurrentMediaReference(mediaId: string): Promise<void> {
|
||||
await getDb()
|
||||
.update(media)
|
||||
.set({ currentReferenceCount: sql`${media.currentReferenceCount} + 1` })
|
||||
.where(eq(media.id, mediaId));
|
||||
}
|
||||
|
||||
export async function completePendingMedia(mediaId: string) {
|
||||
const [record] = await getDb()
|
||||
.select()
|
||||
|
||||
Reference in New Issue
Block a user