Renamed module name.
This commit is contained in:
parent
0ffcbe2ac0
commit
5878b239dc
2 changed files with 3 additions and 2 deletions
|
@ -19,7 +19,7 @@ curl http://localhost/api/v1/rss_fetch.json -v -u #{login}:#{password} -H "Conte
|
|||
=end
|
||||
|
||||
def fetch
|
||||
items = RSS.fetch(params[:url], params[:limit])
|
||||
items = Rss.fetch(params[:url], params[:limit])
|
||||
if items == nil
|
||||
render :json => { :message => "failed to fetch #{ params[:url] }", :status => :unprocessable_entity }
|
||||
return
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
module RSS
|
||||
require 'simple-rss'
|
||||
module Rss
|
||||
def self.fetch(url, limit = 10)
|
||||
cache_key = 'rss::' + url
|
||||
items = Cache.get( cache_key )
|
||||
|
|
Loading…
Reference in a new issue