aboutsummaryrefslogtreecommitdiff
path: root/player/endpoints.f90
diff options
context:
space:
mode:
Diffstat (limited to 'player/endpoints.f90')
-rw-r--r--player/endpoints.f9030
1 files changed, 28 insertions, 2 deletions
diff --git a/player/endpoints.f90 b/player/endpoints.f90
index 09d3faa..8708592 100644
--- a/player/endpoints.f90
+++ b/player/endpoints.f90
@@ -57,6 +57,27 @@ contains
end subroutine base_url
+ subroutine append_query_token(url)
+ use config, only: token
+ implicit none
+
+ character(len=*), intent(inout)::url
+ character::prepend
+
+ if(len_trim(token) > 0) then
+
+ if(index(url, "?") > 0) then
+ prepend = "&"
+ else
+ prepend = "?"
+ end if
+
+ url = trim(url)//prepend//"token="//trim(token)
+
+ end if
+
+ end subroutine append_query_token
+
subroutine get_check_in_url(res)
use config
use utilities, only: replace_field
@@ -66,6 +87,7 @@ contains
call base_url(captain, LOCATION_CHECK_IN, .false., res)
call replace_field(res, "name", identity)
+ call append_query_token(res)
end subroutine get_check_in_url
@@ -92,9 +114,11 @@ contains
call replace_field(url, "step", step)
if(present(status)) then
- url = trim(url)//"?"//trim(status_text(status))
+ url = trim(url)//"?status="//trim(status_text(status))
end if
-
+
+ call append_query_token(url)
+
end subroutine get_status_url
subroutine get_job_report_url(job, success, res)
@@ -113,6 +137,8 @@ contains
end if
call replace_field(res, "name", identity)
call replace_field(res, "jobid", job)
+
+ call append_query_token(res)
end subroutine get_job_report_url