完善提示词管理和配置管理的增删改查
This commit is contained in:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user