diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-28 16:01:24 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-01-28 16:01:24 +1100 |
commit | 099afc86dc6a6c9f97e872a6404835ead9742066 (patch) | |
tree | 811ce1c0af3b8d153d05074f389cdc1b8e696f65 /app/controllers/api_controller.rb | |
parent | c799e4184c3f14e7770afa514621c72ebc408c52 (diff) |
Time doesn't need to be converted from string to time anymore
Diffstat (limited to 'app/controllers/api_controller.rb')
-rw-r--r-- | app/controllers/api_controller.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 15fb4f5f9..903ff648d 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -83,7 +83,7 @@ class ApiController < ApplicationController direction = json["direction"] body = json["body"] - sent_at_str = json["sent_at"] + sent_at = json["sent_at"] errors = [] @@ -107,12 +107,6 @@ class ApiController < ApplicationController errors << "The 'body' is empty" end - begin - sent_at = Time.iso8601(sent_at_str) - rescue ArgumentError - errors << "Failed to parse 'sent_at' field as ISO8601 time: #{sent_at_str}" - end - if direction == "request" && !attachments.nil? errors << "You cannot attach files to messages in the 'request' direction" end |