debian-mirror-gitlab/app/services/wiki_pages/create_service.rb
2018-11-18 11:00:15 +05:30

16 lines
321 B
Ruby

# frozen_string_literal: true
module WikiPages
class CreateService < WikiPages::BaseService
def execute
project_wiki = ProjectWiki.new(@project, current_user)
page = WikiPage.new(project_wiki)
if page.create(@params)
execute_hooks(page, 'create')
end
page
end
end
end