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