mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
bb11f5008f
* Clean up unused variables, return types, many quick type any
23 lines
754 B
TypeScript
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);
|
|
},
|
|
};
|