module Api
- class ChangesetCommentsController < ApplicationController
- skip_before_action :verify_authenticity_token
+ class ChangesetCommentsController < ApiController
before_action :authorize
- before_action :api_deny_access_handler
authorize_resource
changeset.subscribers << current_user unless changeset.subscribers.exists?(current_user.id)
# Return a copy of the updated changeset
- render :xml => changeset.to_xml.to_s
+ @changeset = changeset
+ render "api/changesets/changeset"
end
##
comment.update(:visible => false)
# Return a copy of the updated changeset
- render :xml => comment.changeset.to_xml.to_s
+ @changeset = comment.changeset
+ render "api/changesets/changeset"
end
##
comment.update(:visible => true)
# Return a copy of the updated changeset
- render :xml => comment.changeset.to_xml.to_s
+ @changeset = comment.changeset
+ render "api/changesets/changeset"
end
end
end