Permalink
Browse files

Be friendly! Supply a default radius to bots

... and other javascript challenged visitors (who will see nothing
anyway).
  • Loading branch information...
1 parent 1e4e7b0 commit ce125a04ac3eaf69a4129c124744d9c7a5736db1 @msantos committed Mar 17, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/wwallo_resource.erl
View
@@ -30,6 +30,9 @@ to_json(ReqData, Context) ->
resource_exists(ReqData, _Context) ->
handle_request(wrq:path_tokens(ReqData), ReqData, _Context).
+handle_request(["null,"], ReqData, Context) ->
+ handle_request(["null,5km"], ReqData, Context);
+
handle_request(["null," ++ Distance], ReqData, _Context) ->
Peer = ipaddr:ipv4(wrq:peer(ReqData)),
{ok, Rec} = egeoip:lookup(Peer),

0 comments on commit ce125a0

Please sign in to comment.