Skip to content

Commit

Permalink
404 status code if user is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangenco committed Aug 31, 2013
1 parent 5bf200d commit cbebf64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ def to_human
# IE 9 and below tries to download the result if Content-Type is application/json
content_type (request.user_agent && request.user_agent.index(/MSIE [6-9]/) ? 'text/plain' : :json)

return unless @user = User.get(params[:username])
unless @user = User.get(params[:username])
status 404
return
end

redirect '/' unless @user.dropbox_session
@dbsession = DropboxSession.deserialize(@user.dropbox_session)
Expand Down

0 comments on commit cbebf64

Please sign in to comment.