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

33 lines
822 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 baseUrl = '/sms/v1/admissions'
export function getIpAccess(params) {
return request.get(baseUrl, {
params
})
}
export function getIpAccessDetail(id) {
return request.get(`${baseUrl}/${id}`)
}
export function createIpAccess(params) {
return request.post(baseUrl, wrapperParams(params))
}
export function removeIpAccess(id) {
return request.delete(`${baseUrl}/${id}`)
}
export function batchRemoveIpAccess(params) {
return request.delete(`${baseUrl}`, {
data: params
})
}
export function getStrategies(params) {
return request.get('/sms/v1/access/strategies', {
params
})
}
export function modifyStrategies(params) {
return request.put(`/sms/v1/access/strategies/${params.id}`, wrapperParams(params))
}