Skip to content

Commit

Permalink
Add return type
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv committed Sep 23, 2023
1 parent 98a8c80 commit 23888d7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* 2.0.
*/

import type { SecurityRoleDescriptor } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';

import {
FLEET_APM_PACKAGE,
FLEET_UNIVERSAL_PROFILING_COLLECTOR_PACKAGE,
Expand Down Expand Up @@ -203,7 +205,7 @@ export function getDataStreamPrivileges(dataStream: DataStreamMeta, namespace: s
};
}

function universalProfilingPermissions(packagePolicyId: string) {
function universalProfilingPermissions(packagePolicyId: string): [string, SecurityRoleDescriptor] {
const profilingIndexPattern = 'profiling-*';
return [
packagePolicyId,
Expand All @@ -218,7 +220,7 @@ function universalProfilingPermissions(packagePolicyId: string) {
];
}

function apmPermissions(packagePolicyId: string) {
function apmPermissions(packagePolicyId: string): [string, SecurityRoleDescriptor] {
return [
packagePolicyId,
{
Expand Down

0 comments on commit 23888d7

Please sign in to comment.