diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-08-17 08:26:20 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-08-17 08:26:20 -0400 |
commit | d1e500b626de0c906273f3cf4e21479779f48aef (patch) | |
tree | ca1d44ce13941f80016b6e29327f903ce32d77e6 /captain/api.f90 | |
parent | cd4a5891b8e2a019fdfda7512d6490e075628292 (diff) | |
download | levitating-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.f90 | 14 |
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 |