Return the page's most recent version instead of random string.

This commit is contained in:
Bart Kamphorst
2018-11-20 15:04:32 +01:00
parent 4eb7fd211c
commit f4838d12c6
+2 -1
View File
@@ -287,7 +287,8 @@ module Precious
return if page.nil?
if etag != page.sha
halt 412, 'For future use: some helpful data for resolving the conflict here.'
# Signal edit collision and return the page's most recent version
halt 412, {etag: page.sha, text_data: page.text_data}.to_json
end
committer = Gollum::Committer.new(wiki, commit_message)