@tapis/tapisui-api
Version:
Typescript library for making api calls with react query
22 lines (19 loc) • 500 B
text/typescript
import { Workflows } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from '../../utils';
const create = (
params: Workflows.AddGroupSecretRequest,
basePath: string,
jwt: string
) => {
const api: Workflows.GroupSecretsApi =
apiGenerator<Workflows.GroupSecretsApi>(
Workflows,
Workflows.GroupSecretsApi,
basePath,
jwt
);
return errorDecoder<Workflows.RespGroupSecret>(() =>
api.addGroupSecret(params)
);
};
export default create;