diff options
Diffstat (limited to 'captain/external.f90')
-rw-r--r-- | captain/external.f90 | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/captain/external.f90 b/captain/external.f90 index 518abcb..c4dcb5a 100644 --- a/captain/external.f90 +++ b/captain/external.f90 @@ -791,4 +791,40 @@ contains end function external_request_gemini -end module external_handling
\ No newline at end of file + function external_request_titan(req) result(resp) + use server_response + use special_filenames + use logging + implicit none + + type(titan_request), intent(in)::req + type(response)::resp + + character(len=:), pointer::fullpath + character(12)::job_text, task_text + integer::job_id, task_num + + character(64)::msg + + fullpath => get_full_filename_from_request(req) + + if(associated(fullpath)) then + + ! Write the file + call write_log("Storing titan file to "//trim(fullpath), LOG_DEBUG) + + call req%write_to(fullpath) + + resp%code = GEMINI_CODE_SUCCESS + call resp%set_body_contents(RESPONSE_JSON_OKAY) + resp%body_mimetype = "text/plain" + + else + + resp%code = GEMINI_CODE_PERMFAIL + + end if + + end function external_request_titan + +end module external_handling |