Files
cody-crm/frontend/packages/lib-shared/api/modules/system/authorizedManagement.ts
wangziqi 72e2110987
Some checks failed
Synchronize to Gitee / repo-sync (push) Has been cancelled
Typos Checking / Spell Check with Typos (push) Has been cancelled
chore: initial commit
2026-06-23 11:56:23 +08:00

24 lines
643 B
TypeScript

import type { CordysAxios } from '@lib/shared/api/http/Axios';
import { AddLicenseUrl, GetLicenseUrl } from '@lib/shared/api/requrls/system/authorizedManagement';
import type { LicenseInfo } from '@lib/shared/models/system/authorizedManagement';
export default function useProductApi(CDR: CordysAxios) {
/**
* 授权管理相关API
*/
// 获取License
function getLicense() {
return CDR.get<LicenseInfo>({ url: GetLicenseUrl }, { ignoreCancelToken: true });
}
// 添加License
function addLicense(data: string) {
return CDR.post({ url: AddLicenseUrl, data });
}
return {
getLicense,
addLicense,
};
}