mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
8acf14ab43
Related to #7206, this delegates the handling of the download to the browser
27 lines
751 B
TypeScript
27 lines
751 B
TypeScript
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
import { IInstallerType } from "interfaces/installer";
|
|
import sendRequest from "services";
|
|
import ENDPOINTS from "utilities/endpoints";
|
|
|
|
export interface ICheckInstallerExistenceRequestParams {
|
|
enrollSecret: string;
|
|
includeDesktop: boolean;
|
|
installerType: IInstallerType;
|
|
}
|
|
|
|
export default {
|
|
checkInstallerExistence: ({
|
|
enrollSecret,
|
|
includeDesktop,
|
|
installerType,
|
|
}: ICheckInstallerExistenceRequestParams): Promise<BlobPart> => {
|
|
const path = `${
|
|
ENDPOINTS.DOWNLOAD_INSTALLER
|
|
}/${installerType}?desktop=${includeDesktop}&enroll_secret=${encodeURIComponent(
|
|
enrollSecret
|
|
)}`;
|
|
|
|
return sendRequest("HEAD", path, undefined);
|
|
},
|
|
};
|