Permalink
Browse files

Implement icon dumper

  • Loading branch information...
rosylilly committed Oct 22, 2017
1 parent b247d07 commit 25bc4cf4e2cdd9fc00648b6c5c68aeeb9c004a7a
Showing with 11 additions and 1 deletion.
  1. +11 −1 isubata/webapp/ruby/app.rb
View
@@ -241,7 +241,7 @@ def user
@self_profile = user['id'] == @user['id']
erb :profile
end
get '/add_channel' do
if user.nil?
return redirect '/login', 303
@@ -334,6 +334,16 @@ def user
404
end
post '/dump/icons' do
rows = db.query('SELECT `name`, `data` FROM `image`')
rows.each do |row|
File.write("#{ENV['HOME']}/icons/#{name}", data)
end
return "OK"
end
private
def db

0 comments on commit 25bc4cf

Please sign in to comment.