An unofficial, mostly Bitwarden-compatible API server written in Ruby (Sinatra and ActiveRecord)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

implement a dumb icon api endpoint

+18 -5
+3 -5
lib/api.rb
··· 321 321 end 322 322 323 323 namespace ICONS_URL do 324 - get "/icons/:domain/icon.png" do 325 - content_type "image/x-icon" 326 - 327 - # TODO 324 + get "/:domain/icon.png" do 325 + # TODO: do this service ourselves 328 326 329 - "" 327 + redirect "http://#{params[:domain]}/favicon.ico" 330 328 end 331 329 end
+15
spec/icon_spec.rb
··· 1 + require_relative "spec_helper.rb" 2 + 3 + describe "icon module" do 4 + it "should fetch an icon" do 5 + get "/icons/example.com/icon.png" 6 + 7 + last_response.status.wont_equal 404 8 + end 9 + 10 + it "should fetch an icon for a long domain" do 11 + get "/icons/www.internal.corp.example.com/icon.png" 12 + 13 + last_response.status.wont_equal 404 14 + end 15 + end