Skip to content
Snippets Groups Projects
Commit 187faacf authored by Tyler Lemburg's avatar Tyler Lemburg
Browse files

images

parent 44c7fe21
No related branches found
No related tags found
No related merge requests found
......@@ -132,13 +132,4 @@ get '/' do
}
end
get '/images/:event_id/?' do
event = Event.find_by(:id => params[:event_id])
if event.nil? || event.imagedata.nil?
raise Sinatra::NotFound
end
return event.imagedata
end
Dir.glob("#{ROOT}/routes/*.rb") { |file| require file }
\ No newline at end of file
require 'active_record'
require 'models/user'
class ServiceSpaceRequest < ActiveRecord::Base
belongs_to :user
end
\ No newline at end of file
require 'sinatra'
require 'models/event'
require 'models/service_space'
get '/images/:event_id/?' do
event = Event.find_by(:id => params[:event_id])
if event.nil? || event.imagedata.nil?
raise Sinatra::NotFound
end
return event.imagedata
end
get '/service_space/images/:space_id/?' do
space = ServiceSpace.find_by(:id => params[:space_id])
if space.nil? || space.imagedata.nil?
raise Sinatra::NotFound
end
return space.imagedata
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment