Skip to content

Commit

Permalink
Clean up fleet setup request/response typings
Browse files Browse the repository at this point in the history
  • Loading branch information
jen-huang committed Apr 21, 2020
1 parent 840808c commit e0e62b1
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface GetFleetSetupRequest {}

export interface CreateFleetSetupRequest {
body: {
fleet_enroll_username: string;
fleet_enroll_password: string;
};
}

export interface CreateFleetSetupResponse {
isInitialized: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import { RequestHandler } from 'src/core/server';
import { outputService } from '../../services';
import { CreateFleetSetupResponse } from '../../types';
import { CreateFleetSetupResponse } from '../../../common';
import { setupIngestManager, setupFleet } from '../../services/setup';

export const getFleetSetupHandler: RequestHandler = async (context, request, response) => {
Expand Down
5 changes: 2 additions & 3 deletions x-pack/plugins/ingest_manager/server/routes/setup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
import { IRouter } from 'src/core/server';
import { PLUGIN_ID, FLEET_SETUP_API_ROUTES, SETUP_API_ROUTE } from '../../constants';
import { GetFleetSetupRequestSchema, CreateFleetSetupRequestSchema } from '../../types';
import {
getFleetSetupHandler,
createFleetSetupHandler,
Expand All @@ -28,7 +27,7 @@ export const registerRoutes = (router: IRouter) => {
router.get(
{
path: FLEET_SETUP_API_ROUTES.INFO_PATTERN,
validate: GetFleetSetupRequestSchema,
validate: false,
options: { tags: [`access:${PLUGIN_ID}-read`] },
},
getFleetSetupHandler
Expand All @@ -38,7 +37,7 @@ export const registerRoutes = (router: IRouter) => {
router.post(
{
path: FLEET_SETUP_API_ROUTES.CREATE_PATTERN,
validate: CreateFleetSetupRequestSchema,
validate: false,
options: { tags: [`access:${PLUGIN_ID}-all`] },
},
createFleetSetupHandler
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ export * from './agent';
export * from './datasource';
export * from './epm';
export * from './enrollment_api_key';
export * from './fleet_setup';
export * from './install_script';

0 comments on commit e0e62b1

Please sign in to comment.