mirror of
https://github.com/langgenius/dify.git
synced 2026-07-23 20:18:40 +08:00
12 lines
403 B
TypeScript
12 lines
403 B
TypeScript
import { createConsoleApiContext, expectApiResponseOK } from './console-context'
|
|
|
|
export async function deleteTestDataset(datasetId: string): Promise<void> {
|
|
const ctx = await createConsoleApiContext()
|
|
try {
|
|
const response = await ctx.delete(`/console/api/datasets/${datasetId}`)
|
|
await expectApiResponseOK(response, `Delete dataset ${datasetId}`)
|
|
} finally {
|
|
await ctx.dispose()
|
|
}
|
|
}
|