推送远程分支前的排查和修复代码
This commit is contained in:
8
src/actions/batch.ts
Normal file
8
src/actions/batch.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
'use server'
|
||||
import {PageRecord} from '@/lib/api'
|
||||
import {Batch} from '@/lib/models/batch'
|
||||
import {callByUser} from './base'
|
||||
|
||||
export async function pageBatch(props: {page: number, size: number}) {
|
||||
return callByUser<PageRecord<Batch>>('/api/batch/page', props)
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
import {callByUser, callPublic} from '@/actions/base'
|
||||
import {Channel} from '@/lib/models'
|
||||
import {PageRecord} from '@/lib/api'
|
||||
import {BatchRecord} from '@/lib/models/batch'
|
||||
import {Batch} from '@/lib/models/batch'
|
||||
|
||||
export async function listChannels(props: {
|
||||
page: number
|
||||
@@ -16,10 +16,6 @@ export async function listChannels(props: {
|
||||
return callByUser<PageRecord<Channel>>('/api/channel/list', props)
|
||||
}
|
||||
|
||||
export async function extractRecord(props: {page: number, size: number}) {
|
||||
return callByUser<PageRecord<BatchRecord>>('/api/batch/page', props)
|
||||
}
|
||||
|
||||
type CreateChannelsResp = {
|
||||
host: string
|
||||
port: string
|
||||
|
||||
@@ -87,5 +87,9 @@ export async function payClose(props: {
|
||||
}
|
||||
|
||||
export async function getPrice(props: CreateResourceReq) {
|
||||
return callByDevice<{price: string}>('/api/resource/price', props)
|
||||
return callByDevice<{
|
||||
price: string
|
||||
discounted_price?: string
|
||||
discounted?: number
|
||||
}>('/api/resource/price', props)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user