完善通道创建功能,添加参数验证与格式化输出
This commit is contained in:
24
src/actions/channel.ts
Normal file
24
src/actions/channel.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import {callByUser} from '@/actions/base'
|
||||
|
||||
async function createChannels(params: {
|
||||
resource_id: number
|
||||
protocol: number
|
||||
auth_type: number
|
||||
count: number
|
||||
prov?: string
|
||||
city?: string
|
||||
isp?: string
|
||||
}) {
|
||||
return callByUser<CreateChannelsResp[]>('/api/channel/create', params)
|
||||
}
|
||||
|
||||
type CreateChannelsResp = {
|
||||
host: string
|
||||
port: string
|
||||
username?: string
|
||||
password?: string
|
||||
}
|
||||
|
||||
export {
|
||||
createChannels,
|
||||
}
|
||||
Reference in New Issue
Block a user