2016-02-28 02:26:52 -05:00
|
|
|
module WikiPages
|
|
|
|
class UpdateService < WikiPages::BaseService
|
|
|
|
def execute(page)
|
2017-07-23 08:43:32 -04:00
|
|
|
if page.update(@params[:content], format: @params[:format], message: @params[:message], last_commit_sha: @params[:last_commit_sha])
|
2016-02-28 02:26:52 -05:00
|
|
|
execute_hooks(page, 'update')
|
|
|
|
end
|
|
|
|
|
|
|
|
page
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|