fleet/frontend/services/entities/enroll_secret.ts
RachelElysia bb11f5008f
Frontend tech debt: Clean up 409 lint warnings (#3703)
* Clean up unused variables, return types, many quick type any
2022-02-14 17:11:12 -05:00

23 lines
754 B
TypeScript

/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import specAPI from "services/entities/spec";
import teamsAPI from "services/entities/teams";
import { IEnrollSecret } from "interfaces/enroll_secret";
export default {
getGlobalEnrollSecrets: () => {
return specAPI.getEnrollSecretSpec().then((res) => res.spec);
},
modifyGlobalEnrollSecrets: (secrets: IEnrollSecret[]) => {
return specAPI
.applyEnrollSecretSpec({ spec: { secrets } })
.then((res) => res.spec);
},
getTeamEnrollSecrets: (teamId: number) => {
return teamsAPI.getEnrollSecrets(teamId);
},
modifyTeamEnrollSecrets: (teamId: number, secrets: IEnrollSecret[]) => {
return teamsAPI.modifyEnrollSecrets(teamId, secrets);
},
};