mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
refactor: Update Logs.vue to use URLSearchParams for setting the 'file' parameter
The Logs.vue file has been updated to use the URLSearchParams API to set the 'file' parameter in the URL. This change improves the readability and maintainability of the code by using a built-in method for manipulating URL parameters.
This commit is contained in:
parent
1aae91f487
commit
8fa0b02413
1 changed files with 3 additions and 2 deletions
|
|
@ -42,11 +42,12 @@ function getLogContent() {
|
|||
return;
|
||||
|
||||
const value = e.target.getAttribute("data-setting-value");
|
||||
const url = `${location.href}/logs?file=${value}`;
|
||||
const url = new URL(location.href);
|
||||
url.searchParams.set("file", value);
|
||||
// go to url
|
||||
location.href = url;
|
||||
},
|
||||
true
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue