aboutsummaryrefslogtreecommitdiff
path: root/captain/api.f90
diff options
context:
space:
mode:
Diffstat (limited to 'captain/api.f90')
-rw-r--r--captain/api.f9014
1 files changed, 10 insertions, 4 deletions
diff --git a/captain/api.f90 b/captain/api.f90
index 7b99ec7..665ff8d 100644
--- a/captain/api.f90
+++ b/captain/api.f90
@@ -227,11 +227,17 @@ contains
! Write the file
call write_log("Storing titan file to "//trim(fullpath), LOG_DEBUG)
- call req%write_to(fullpath)
+ if(req%write_to(fullpath)) then
- resp%code = GEMINI_CODE_SUCCESS
- call resp%set_body_contents(RESPONSE_JSON_OKAY)
- resp%body_mimetype = "text/plain"
+ resp%code = GEMINI_CODE_SUCCESS
+ call resp%set_body_contents(RESPONSE_JSON_OKAY)
+ resp%body_mimetype = "text/plain"
+
+ else
+
+ resp%code = GEMINI_CODE_TEMPFAIL
+
+ end if
else