Skip to content

Commit 5b1012b

Browse files
committed
FIX: Generate correct API paths to save config
Previously, the Manager was generating API paths with '//' when calling POST on /runtime and /positions. This is fixed. In addition, VS Code dir is added to the .gitignore
1 parent af4f1a6 commit 5b1012b

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ SPDX-License-Identifier: AGPL-3.0-or-later
77
CHANGELOG
88
=========
99

10+
Unreleased changes
11+
------------------
12+
13+
### Configuration
14+
- Fixed generating paths with doubled slashes when to save configurations.
1015

1116
3.0.1 (2021-09-02)
1217
------------------

intelmq_manager/static/js/configs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,11 @@ function save_data_on_files() {
240240
}
241241

242242
// can't parallelize these due to a race condition from them both touching runtime.yaml; TODO lock file in backend?
243-
authenticatedAjax({type: "POST", url: `${API}/runtime`, contentType: "application/json", data: generate_runtime_conf(app.nodes, app.defaults)})
243+
authenticatedAjax({type: "POST", url: `${RUNTIME_FILE}`, contentType: "application/json", data: generate_runtime_conf(app.nodes, app.defaults)})
244244
.done(saveSucceeded)
245245
.fail(() => alert_error('runtime', ...arguments))
246246
.then(() =>
247-
authenticatedAjax({type: "POST", url: `${API}/positions`, contentType: "application/json", data: generate_positions_conf()})
247+
authenticatedAjax({type: "POST", url: `${POSITIONS_FILE}`, contentType: "application/json", data: generate_positions_conf()})
248248
.done(saveSucceeded)
249249
.fail(() => alert_error('positions', ...arguments) )
250250
)

0 commit comments

Comments
 (0)