UnisKB/ui/src/api/application.ts

23 lines
588 B
TypeScript
Raw Normal View History

2023-11-22 10:37:08 +00:00
import { Result } from '@/request/Result'
import { get, post, del, put } from '@/request/index'
2023-11-23 09:20:19 +00:00
import type { pageRequest } from '@/api/type/common'
2023-11-22 10:37:08 +00:00
const prefix = '/application'
2023-11-23 09:20:19 +00:00
/**
*
* @param {
"current_page": "string",
"page_size": "string",
"name": "string",
}
*/
const getApplication: (param: pageRequest) => Promise<Result<any>> = (param) => {
return get(
`${prefix}/${param.current_page}/${param.page_size}`,
param.name && { name: param.name }
)
}
export default {
getApplication
}