.hand
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
'use server'
|
||||
|
||||
import {PageRecord} from '@/lib/api'
|
||||
import {Announcement} from '@/lib/models'
|
||||
import {callByUser} from './base'
|
||||
|
||||
export async function listAnnouncements(props: {
|
||||
page: number
|
||||
size: number
|
||||
title?: string
|
||||
type?: number
|
||||
status?: number
|
||||
create_after?: Date
|
||||
create_before?: Date
|
||||
update_after?: Date
|
||||
update_before?: Date
|
||||
}) {
|
||||
return await callByUser<PageRecord<Announcement>>('/api/announcement/list', props)
|
||||
}
|
||||
43
src/actions/dashboard.ts
Normal file
43
src/actions/dashboard.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
'use server'
|
||||
|
||||
import {callByUser} from './base'
|
||||
|
||||
export async function listInitialization(props: {
|
||||
page: number
|
||||
size: number
|
||||
title?: string
|
||||
type?: number
|
||||
status?: number
|
||||
create_after?: Date
|
||||
create_before?: Date
|
||||
update_after?: Date
|
||||
update_before?: Date
|
||||
short_term_package?: number
|
||||
}) {
|
||||
return await callByUser<{
|
||||
short_term: string
|
||||
short_term_monthly: string
|
||||
long_term: string
|
||||
long_term_monthly: string
|
||||
list: {
|
||||
id: number
|
||||
title: string
|
||||
created_at: Date
|
||||
}[]
|
||||
}>('/api/announcement/list', props)
|
||||
}
|
||||
|
||||
type listAccountReq = {
|
||||
resource_no: number
|
||||
create_after: Date
|
||||
create_before: Date
|
||||
}
|
||||
|
||||
type listAccountResp = {
|
||||
time: Date
|
||||
count: number
|
||||
}[]
|
||||
|
||||
export async function listAccount(props: listAccountReq) {
|
||||
return await callByUser<listAccountResp>('/api/account/list', props)
|
||||
}
|
||||
Reference in New Issue
Block a user