添加网关列表页面 & 添加单价不能低于最低价格校验
This commit is contained in:
26
src/actions/gateway.ts
Normal file
26
src/actions/gateway.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
"use server"
|
||||
|
||||
import type { PageRecord } from "@/lib/api"
|
||||
import type { Gateway } from "@/models/gateway"
|
||||
import { callByUser } from "./base"
|
||||
|
||||
export async function getGatewayPage(params: { page: number; size: number }) {
|
||||
return callByUser<PageRecord<Gateway>>("/api/admin/proxy/page", params)
|
||||
}
|
||||
|
||||
|
||||
export async function createGateway(data: {
|
||||
mac: string
|
||||
ip: string
|
||||
host?: string
|
||||
type: number
|
||||
status: number
|
||||
}) {
|
||||
return callByUser<Gateway>("/api/admin/proxy/create", data)
|
||||
}
|
||||
|
||||
export async function deletegateway(id: number) {
|
||||
return callByUser<Gateway>("/api/admin/proxy/remove", {
|
||||
id,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user