2018-07-18 16:03:33 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-02-28 07:26:52 +00:00
|
|
|
module WikiPages
|
|
|
|
class CreateService < WikiPages::BaseService
|
|
|
|
def execute
|
2016-04-26 10:54:49 +00:00
|
|
|
project_wiki = ProjectWiki.new(@project, current_user)
|
|
|
|
page = WikiPage.new(project_wiki)
|
2016-02-28 07:26:52 +00:00
|
|
|
|
|
|
|
if page.create(@params)
|
|
|
|
execute_hooks(page, 'create')
|
|
|
|
end
|
|
|
|
|
|
|
|
page
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|