Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unexpected delay parameter on server API requests #6778

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ All notable changes to the Wazuh app project will be documented in this file.

- Support for Wazuh 4.8.1

### Fixed

- Removed the unexpeted `delay` parameter on the server API requests [#6778](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6778)

## Wazuh v4.8.0 - OpenSearch Dashboards 2.10.0 - Revision 12

### Added
Expand Down
5 changes: 5 additions & 0 deletions plugins/main/server/controllers/wazuh-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,11 @@ export class WazuhApiCtrl {
}
const delay = (data || {}).delay || 0;
if (delay) {
// Removes the delay parameter that is used to add the sever API request to the queue job.
// This assumes the delay parameter is not used as part of the server API request. If it
// was expected to do a request with a 'delay' parameter then we would have to search a
// way to differenciate if the parameter is related to job queue or API request.
delete data.delay;
addJobToQueue({
startAt: new Date(Date.now() + delay),
run: async () => {
Expand Down
Loading