aboutsummaryrefslogtreecommitdiff
path: root/captain/api.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-08-17 08:26:20 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-08-17 08:26:20 -0400
commitd1e500b626de0c906273f3cf4e21479779f48aef (patch)
treeca1d44ce13941f80016b6e29327f903ce32d77e6 /captain/api.f90
parentcd4a5891b8e2a019fdfda7512d6490e075628292 (diff)
downloadlevitating-d1e500b626de0c906273f3cf4e21479779f48aef.tar.gz
levitating-d1e500b626de0c906273f3cf4e21479779f48aef.zip
Titan writing routine server-side is now a function returning success in case file can't be written.
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