@ -31,10 +31,10 @@ module Mobile
get ':id' do
# 记录用户流量源
if params[:edu]
ip = request.host
ip = @env['REMOTE_HOST']
ua = UserAgent.find_by_ip(ip)
unless ua
UserAgent.create(:key => params[:edu].strip, :ip => request.host)
UserAgent.create(:key => params[:edu].strip, :ip => ip)
end
MemosService.new.show params, current_user