mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-28 14:12:45 +00:00
13 lines
418 B
TypeScript
13 lines
418 B
TypeScript
import { Result } from '@/request/Result'
|
|
import { get, post } from '@/request/index'
|
|
import type { Ref } from 'vue'
|
|
const trigger: (
|
|
provider: string,
|
|
method: string,
|
|
request_body: any,
|
|
loading?: Ref<boolean>
|
|
) => Promise<Result<Array<any> | string>> = (provider, method, request_body, loading) => {
|
|
return post(`provider/${provider}/${method}`, {}, request_body, loading)
|
|
}
|
|
export default { trigger, get }
|