Skip to content

Commit

Permalink
rollback(configuration): remove API endpoint POST /utils/configuratio…
Browse files Browse the repository at this point in the history
…n/clear

- Remove API endpoint POST /utils/configuration/clear
  - Remove route controller
  • Loading branch information
Desvelao committed Apr 9, 2024
1 parent 7df5a55 commit 4c16459
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
24 changes: 0 additions & 24 deletions plugins/main/server/controllers/wazuh-utils/wazuh-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,6 @@ export class WazuhUtilsCtrl {
}
}

/**
* Clear the configuration
* @param {Object} context
* @param {Object} request
* @param {Object} response
* @returns {Object}
*/
clearConfiguration = routeDecoratorProtectedAdministrator(
async (
context: RequestHandlerContext,
request: OpenSearchDashboardsRequest,
response: OpenSearchDashboardsResponseFactory,
) => {
context.wazuh.logger.debug('Clearing configuration');
await context.wazuh_core.configuration.clear();
return response.ok({
body: {
message: 'Configuration was cleared',
},
});
},
3020,
);

/**
* Update the configuration
* @param {Object} context
Expand Down
10 changes: 0 additions & 10 deletions plugins/main/server/routes/wazuh-utils/wazuh-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,4 @@ export function WazuhUtilsRoutes(router: IRouter, services) {
async (context, request, response) =>
ctrl.deleteFile(context, request, response),
);

// Clear the configuration
router.post(
{
path: '/utils/configuration/clear',
validate: false,
},
async (context, request, response) =>
ctrl.clearConfiguration(context, request, response),
);
}

0 comments on commit 4c16459

Please sign in to comment.