diff --git a/server.rb b/server.rb index 974de20..f739d4d 100644 --- a/server.rb +++ b/server.rb @@ -15,4 +15,10 @@ end get '/about' do erb :about +end + +get '/api/random' do + content_type :json + image = get_random_image(get_images_by_category(categories)) + image.to_json end \ No newline at end of file