38 lines
860 B
TypeScript
38 lines
860 B
TypeScript
import type { PageRecord } from "@/lib/api"
|
|
import type { Channel } from "@/models/channel"
|
|
import { callByUser } from "./base"
|
|
|
|
export async function getPageChannel(params: {
|
|
page: number
|
|
size: number
|
|
batch_no?: string
|
|
user_phone?: string
|
|
resource_no?: string
|
|
proxy_port?: number
|
|
proxy_host?: string
|
|
node_ip?: string
|
|
expired_at_start?: Date
|
|
expired_at_end?: Date
|
|
expired?: boolean
|
|
}) {
|
|
return callByUser<PageRecord<Channel>>("/api/admin/channel/page", params)
|
|
}
|
|
export async function getChannel(params: {
|
|
page: number
|
|
size: number
|
|
user_id: number
|
|
batch_no?: string
|
|
user_phone?: string
|
|
resource_no?: string
|
|
proxy_port?: number
|
|
proxy_host?: string
|
|
node_ip?: string
|
|
expired_at_start?: Date
|
|
expired_at_end?: Date
|
|
}) {
|
|
return callByUser<PageRecord<Channel>>(
|
|
"/api/admin/channel/page/of-user",
|
|
params,
|
|
)
|
|
}
|