Skip to content

Commit afd82c2

Browse files
author
Bogdan Tsechoev
committed
Merge branch 'hotfix-ce-ui-snapshot-delete-endpoint' into 'dle-4-0'
fix "delete" snapshot api endpoint See merge request postgres-ai/database-lab!996
2 parents 3b577af + 9a0fc72 commit afd82c2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

ui/packages/ce/src/api/snapshots/destroySnapshot.js renamed to ui/packages/ce/src/api/snapshots/destroySnapshot.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,9 @@
77

88
import { request } from 'helpers/request'
99

10-
export const destroySnapshot = async (snapshotId, forceDelete) => {
11-
const response = await request(`/snapshot/delete`, {
12-
method: 'POST',
13-
body: JSON.stringify({
14-
snapshotID: snapshotId,
15-
force: forceDelete,
16-
}),
10+
export const destroySnapshot = async (snapshotId: string, forceDelete: boolean) => {
11+
const response = await request(`/snapshot/${snapshotId}?force=${forceDelete}`, {
12+
method: 'DELETE'
1713
})
1814

1915
return {

0 commit comments

Comments
 (0)