gitlab-org--gitlab-foss/app/services/wiki_pages/update_service.rb

12 lines
302 B
Ruby
Raw Normal View History

module WikiPages
class UpdateService < WikiPages::BaseService
def execute(page)
if page.update(@params[:content], format: @params[:format], message: @params[:message], last_commit_sha: @params[:last_commit_sha])
execute_hooks(page, 'update')
end
page
end
end
end