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:
parent
1868b36379
commit
e433ebc439
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue