chore(plugins): cast config en Prisma.InputJsonValue

Le type Record<string,unknown> ne satisfait pas le narrowing JSON Prisma.
Cast explicite pour faire passer le build TS.
This commit is contained in:
Claude Integration 2026-05-30 23:30:12 +00:00
parent 1868b36379
commit e433ebc439

View file

@ -9,6 +9,7 @@
*/
import "server-only";
import { Prisma } from "@/generated/prisma/client";
import { prisma } from "@/lib/prisma";
import { PLUGINS, type PluginDescriptor } from "./registry";
import { pluginHooks } from "./hooks";
@ -123,7 +124,10 @@ export async function togglePlugin(key: string, enabled: boolean): Promise<Plugi
}
export async function updatePluginConfig(key: string, config: Record<string, unknown>): Promise<PluginRow | null> {
await prisma.plugin.update({ where: { key }, data: { config } });
await prisma.plugin.update({
where: { key },
data: { config: config as Prisma.InputJsonValue },
});
invalidatePluginCache();
return await getPluginState(key);
}