mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
feat: sdk migration in progress
This commit is contained in:
23
ui/src/api/taints.ts
Normal file
23
ui/src/api/taints.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { withRefresh } from "@/api/with-refresh.ts"
|
||||
import type { DtoCreateTaintRequest, DtoUpdateTaintRequest } from "@/sdk"
|
||||
import { makeTaintsApi } from "@/sdkClient.ts"
|
||||
|
||||
const taints = makeTaintsApi()
|
||||
export const taintsApi = {
|
||||
listTaints: () =>
|
||||
withRefresh(async () => {
|
||||
return await taints.listTaints()
|
||||
}),
|
||||
createTaint: (body: DtoCreateTaintRequest) =>
|
||||
withRefresh(async () => {
|
||||
return await taints.createTaint({ body })
|
||||
}),
|
||||
deleteTaint: (id: string) =>
|
||||
withRefresh(async () => {
|
||||
await taints.deleteTaint({ id })
|
||||
}),
|
||||
updateTaint: (id: string, body: DtoUpdateTaintRequest) =>
|
||||
withRefresh(async () => {
|
||||
return await taints.updateTaint({ id, body })
|
||||
}),
|
||||
}
|
||||
Reference in New Issue
Block a user