master
E. Almqvist 3 years ago
parent 9b241f5027
commit ec816f8625
  1. 8
      src/app.rb

@ -229,7 +229,9 @@ get "/auctions/:id" do
end end
end end
# Admin panel ###############
# Admin panel #
###############
get "/admin" do get "/admin" do
flags = get_current_user.flags flags = get_current_user.flags
@ -463,7 +465,7 @@ get "/admin/categories/:id/edit" do
end end
end end
post "/admin/roles/:id/update" do post "/admin/categories/:id/update" do
id = params[:id].to_i id = params[:id].to_i
user = get_current_user user = get_current_user
auth_denied unless user.permitted? :cateman auth_denied unless user.permitted? :cateman
@ -475,6 +477,6 @@ post "/admin/roles/:id/update" do
resp = Category.edit id, data resp = Category.edit id, data
flash[:success] = "Updated category." flash[:success] = "Updated category."
redirect "/admin/roles/#{id}/edit" redirect "/admin/categories/#{id}/edit"
end end

Loading…
Cancel
Save