完善提示词管理和配置管理的增删改查

This commit is contained in:
2025-04-09 21:48:28 +08:00
parent fda6515891
commit 4e43df00c0
14 changed files with 1100 additions and 484 deletions
+3 -2
View File
@@ -8,6 +8,7 @@ export interface ConfigItem {
description: string;
environment: string;
config: Record<string, unknown>;
remark: string;
is_active: boolean;
version: string;
created_by: number;
@@ -229,7 +230,7 @@ export async function createConfig(data: {
environment: string;
config: Record<string, unknown>;
is_active: boolean;
remarks?: string;
remark?: string;
}): Promise<{data: ConfigItem; error?: never} | {data?: never; error: string}> {
try {
const response = await postgrestPost<ConfigItem, typeof data>('configurations', data);
@@ -263,7 +264,7 @@ export async function updateConfig(id: string, data: {
environment: string;
config: Record<string, unknown>;
is_active: boolean;
remarks?: string;
remark?: string;
}): Promise<{data: ConfigItem; error?: never} | {data?: never; error: string}> {
try {
const response = await postgrestPut<ConfigItem, typeof data>('configurations', data, {