Simplify builds.html parameter handling
This commit is contained in:
parent
534e343c73
commit
b873d09d22
1 changed files with 1 additions and 6 deletions
|
|
@ -80,12 +80,7 @@
|
|||
|
||||
function connect() {
|
||||
console.log("connecting...")
|
||||
const repo = new URLSearchParams(window.location.search).get("repo");
|
||||
const target_branch = new URLSearchParams(window.location.search).get("target_branch");
|
||||
var url = `/api/v1/build-events?repo=${repo}`
|
||||
if (target_branch) {
|
||||
url += `&target_branch=${target_branch}`
|
||||
}
|
||||
var url = `/api/v1/build-events${window.location.search}`
|
||||
evtSource = new EventSource(url);
|
||||
evtSource.onopen = onopen;
|
||||
evtSource.onmessage = onmessage;
|
||||
|
|
|
|||
Loading…
Reference in a new issue