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
|