diff --git a/lib/travis/api/app/endpoint.rb b/lib/travis/api/app/endpoint.rb index 11c82afc..47799354 100644 --- a/lib/travis/api/app/endpoint.rb +++ b/lib/travis/api/app/endpoint.rb @@ -14,7 +14,7 @@ class Travis::Api::App # TODO hmmm? before { flash.clear } - before { content_type :json } + after { content_type :json unless content_type } error(ActiveRecord::RecordNotFound, Sinatra::NotFound) { not_found } not_found { content_type =~ /json/ ? { 'file' => 'not found' } : 'file not found' }