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