feat: implement admin video upload system with platform integration for YouTube and TikTok
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { processDueVideoUploads } from "@/lib/video-platforms";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET(request: Request) {
|
||||
const authorization = request.headers.get("authorization");
|
||||
if (
|
||||
!process.env.CRON_SECRET ||
|
||||
authorization !== `Bearer ${process.env.CRON_SECRET}`
|
||||
)
|
||||
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
||||
await processDueVideoUploads();
|
||||
return NextResponse.json({ ok: true });
|
||||
}
|
||||
Reference in New Issue
Block a user