UnisKB/ui/src/api/license.ts

25 lines
603 B
TypeScript
Raw Normal View History

2024-07-17 07:24:53 +00:00
import { Result } from '@/request/Result'
import { get, post, del, put } from '@/request/index'
import { type Ref } from 'vue'
const prefix = '/license'
/**
* license
*/
const getLicense: (loading?: Ref<boolean>) => Promise<Result<any>> = (loading) => {
return get(`${prefix}/profile`, undefined, loading)
}
/**
* license
* @param license_file:file
*/
const putLicense: (data: any, loading?: Ref<boolean>) => Promise<Result<any>> = (data, loading) => {
return put(`${prefix}/profile`, data, undefined, loading)
}
export default {
getLicense,
putLicense
}