Standarize on name instead of page as URL param.
This commit is contained in:
@@ -59,14 +59,14 @@ module Precious
|
|||||||
redirect "/#{name}"
|
redirect "/#{name}"
|
||||||
end
|
end
|
||||||
|
|
||||||
post '/create/:page' do
|
post '/create/:name' do
|
||||||
page = params[:page]
|
page = params[:name]
|
||||||
wiki = Gollum::Wiki.new($path)
|
wiki = Gollum::Wiki.new($path)
|
||||||
|
|
||||||
format = params[:format].intern
|
format = params[:format].intern
|
||||||
|
|
||||||
wiki.write_page(page, format, params[:content], commit_message)
|
wiki.write_page(page, format, params[:content], commit_message)
|
||||||
redirect "/#{page}"
|
redirect "/#{name}"
|
||||||
end
|
end
|
||||||
|
|
||||||
get %r{/(.+?)/([0-9a-f]{40})} do
|
get %r{/(.+?)/([0-9a-f]{40})} do
|
||||||
|
|||||||
Reference in New Issue
Block a user