Added JSON responses in the resources.rb file