From 2547fc90a8630aec7f31af8be0bebf5e6c68dca1 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Mon, 9 Jul 2012 12:43:55 +0100 Subject: Calls to API that are expected to return JSON are always expected to return something, even when there are no errors. --- app/controllers/api_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/controllers/api_controller.rb') diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 2ba88eb1a..6117435db 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -151,8 +151,9 @@ class ApiController < ApplicationController mail = RequestMailer.create_external_response(request, body, sent_at, attachment_hashes) request.receive(mail, mail.encoded, true) end - - head :no_content + render :json => { + 'url' => make_url("request", request.url_title), + } end def body_request_events -- cgit v1.2.3