新增通道列表查询页面
This commit is contained in:
@@ -1,7 +1,28 @@
|
||||
'use server'
|
||||
import {callByUser} from '@/actions/base'
|
||||
import {Channel} from '@/lib/models'
|
||||
import {PageRecord} from '@/lib/api'
|
||||
|
||||
async function createChannels(params: {
|
||||
export async function listChannels(props: {
|
||||
page: number
|
||||
size: number
|
||||
auth_type?: number
|
||||
prov?: string
|
||||
city?: string
|
||||
isp?: string
|
||||
expiration?: Date
|
||||
}) {
|
||||
return callByUser<PageRecord<Channel>>('/api/channel/list', props)
|
||||
}
|
||||
|
||||
type CreateChannelsResp = {
|
||||
host: string
|
||||
port: string
|
||||
username?: string
|
||||
password?: string
|
||||
}
|
||||
|
||||
export async function createChannels(params: {
|
||||
resource_id: number
|
||||
protocol: number
|
||||
auth_type: number
|
||||
@@ -12,14 +33,3 @@ async function createChannels(params: {
|
||||
}) {
|
||||
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