aboutsummaryrefslogtreecommitdiff
path: root/captain/api.f90
diff options
context:
space:
mode:
Diffstat (limited to 'captain/api.f90')
-rw-r--r--captain/api.f9017
1 files changed, 16 insertions, 1 deletions
diff --git a/captain/api.f90 b/captain/api.f90
index 2f0a746..4d9545e 100644
--- a/captain/api.f90
+++ b/captain/api.f90
@@ -84,15 +84,17 @@ contains
use captain_db
use special_filenames
use logging
+ use query_utilities
implicit none
type(request), intent(in)::req
type(response)::resp
character(PLAYER_NAME_LENGTH)::player, instruction
- integer::job_i, player_i
+ integer::job_i, player_i, qs_platform_index
character(len=:), pointer::checkin_work_json
+ type(query)::q
! Complete - "/api/player/{name}/job/{jobid}/complete"
! Failed - "/api/player/{name}/job/{jobid}/failed"
@@ -130,6 +132,19 @@ contains
! the jobs as failed.
call mark_working_jobs_as_failed(player_i)
+ ! Acknowledge the checkin in the database
+ if(associated(req%query_string)) then
+ call q%init(req%query_string)
+ if(associated(q%get_value("platform"))) then
+ call acknowledge_checkin(player_i, q%get_value("platform"))
+ else
+ call acknowledge_checkin(player_i)
+ end if
+ call q%destroy()
+ else
+ call acknowledge_checkin(player_i)
+ end if
+
job_i = get_pending_job_for_player(player_i)
if(job_i < 0) then
resp%code = GEMINI_CODE_SUCCESS