diff options
Diffstat (limited to '')
| -rw-r--r-- | packages/trpc/routers/admin.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/trpc/routers/admin.ts b/packages/trpc/routers/admin.ts index c7dd7575..6393c950 100644 --- a/packages/trpc/routers/admin.ts +++ b/packages/trpc/routers/admin.ts @@ -9,6 +9,7 @@ import { OpenAIQueue, SearchIndexingQueue, TidyAssetsQueue, + triggerReprocessingFixMode, triggerSearchReindex, } from "@hoarder/shared/queues"; import { @@ -154,6 +155,15 @@ export const adminAppRouter = router({ await Promise.all(bookmarkIds.map((b) => triggerSearchReindex(b.id))); }), + reprocessAssetsFixMode: adminProcedure.mutation(async ({ ctx }) => { + const bookmarkIds = await ctx.db.query.bookmarkAssets.findMany({ + columns: { + id: true, + }, + }); + + await Promise.all(bookmarkIds.map((b) => triggerReprocessingFixMode(b.id))); + }), reRunInferenceOnAllBookmarks: adminProcedure .input( z.object({ |
