gitlab-org--gitlab-foss/app/services/wiki_pages/create_service.rb
Rémy Coutable 3811eb0ba1 Fix error when trying to create a wiki page
Closes #15527.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-29 06:50:18 -07:00

14 lines
290 B
Ruby

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