cmc-web/packages/api/system/recycle.js

28 lines
691 B
JavaScript
Raw Normal View History

2024-08-20 12:11:31 +00:00
import { request } from '@cmp/cmp-element'
import { wrapperParams } from 'utils'
const recyclesUrl = '/cos/v1/recycles'
export function getRecycle(params) {
return request.get(recyclesUrl, {
params
})
}
export function patchRecycle(params) {
return request.patch(`${recyclesUrl}/${params.id}/restore`, {
...wrapperParams(params)
})
}
export function deleteRecycle(params) {
return request.post('/cos/v1/resource/cancelation/all', params)
}
export function patchToRecycle(params) {
return request.patch(`/cmp/plugins/v1/${params.url}/${params.id}/recycle`)
}
export function checkUnderway(params) {
return request.get('/cos/v1/orders/underway/check', { params })
}