refactor: remove catalog sync jobs and version history
This commit is contained in:
@@ -16,9 +16,9 @@ import { builtInTemplates } from "@/lib/templates";
|
||||
import { persistTemplateApplication } from "@/lib/templates/persist";
|
||||
import {
|
||||
createGuide,
|
||||
enqueueCatalogSync,
|
||||
permanentlyDeleteGuide,
|
||||
restoreGuide,
|
||||
runCatalogSync,
|
||||
saveArtifacts,
|
||||
saveConstellations,
|
||||
saveExtraSections,
|
||||
@@ -274,10 +274,9 @@ export async function deleteStructuredGuide(guideId: string) {
|
||||
}
|
||||
|
||||
export async function startCatalogSync() {
|
||||
const admin = await requireAdmin();
|
||||
await requireAdmin();
|
||||
try {
|
||||
const job = await enqueueCatalogSync(admin.user.id);
|
||||
return { status: "saved" as const, jobId: job.id };
|
||||
return await runCatalogSync();
|
||||
} catch (cause) {
|
||||
return { status: "error" as const, message: cause instanceof Error ? cause.message : "เริ่ม Sync ไม่สำเร็จ" };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user