Skip to content

Commit

Permalink
[Fleet] Remove wrong incorrect import from fleet server host service (e…
Browse files Browse the repository at this point in the history
…lastic#212918)

## Summary

Small follow up of elastic#208091 

The editor autocompletion added an incorrect import and so I'm removing
it, plus a few comments that should have been removed.

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
criamico and elasticmachine authored Mar 4, 2025
1 parent 8b8b0ae commit aae11b0
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import type {
KibanaRequest,
} from '@kbn/core/server';

import type { Nullable } from 'tough-cookie';

import { normalizeHostsForAgents } from '../../common/services';
import {
GLOBAL_SETTINGS_SAVED_OBJECT_TYPE,
Expand Down Expand Up @@ -151,7 +149,6 @@ class FleetServerHostService {
}

public async get(soClient: SavedObjectsClientContract, id: string): Promise<FleetServerHost> {
// add code to retrieve encrypted fields
const res = await this.encryptedSoClient.get<FleetServerHostSOAttributes>(
FLEET_SERVER_HOST_SAVED_OBJECT_TYPE,
id
Expand Down Expand Up @@ -190,7 +187,6 @@ class FleetServerHostService {
};
}

// export async function deleteFleetServerHost(
public async delete(
soClient: SavedObjectsClientContract,
esClient: ElasticsearchClient,
Expand Down Expand Up @@ -243,7 +239,7 @@ class FleetServerHostService {
logger.debug(`Updating fleet server host ${id}`);

const originalItem = await this.get(soClient, id);
const updateData: Nullable<Partial<FleetServerHostSOAttributes>> = {
const updateData: Partial<FleetServerHostSOAttributes> = {
...omit(data, ['ssl', 'secrets']),
};

Expand Down Expand Up @@ -354,9 +350,9 @@ class FleetServerHostService {
);
}

// /**
// * Get the default Fleet server policy hosts or throw if it does not exists
// */
/**
* Get the default Fleet server policy hosts or throw if it does not exists
*/
public async getDefaultFleetServerHost(
soClient: SavedObjectsClientContract
): Promise<FleetServerHost | null> {
Expand Down

0 comments on commit aae11b0

Please sign in to comment.