2013-06-12 15:59:58 +00:00
|
|
|
# Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2012-07-19 21:31:57 +00:00
|
|
|
class RecentViewedController < ApplicationController
|
|
|
|
before_filter :authentication_check
|
|
|
|
|
2012-09-20 12:08:02 +00:00
|
|
|
=begin
|
|
|
|
|
|
|
|
Resource:
|
|
|
|
GET /api/recent_viewed
|
|
|
|
|
|
|
|
Response:
|
|
|
|
{
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Test:
|
|
|
|
curl http://localhost/api/recent_viewed.json -v -u #{login}:#{password} -H "Content-Type: application/json" -X GET
|
|
|
|
|
|
|
|
=end
|
|
|
|
|
2012-07-19 21:31:57 +00:00
|
|
|
def recent_viewed
|
2013-05-11 23:33:37 +00:00
|
|
|
recent_viewed = RecentView.list_fulldata( current_user, 10 )
|
2012-07-19 21:31:57 +00:00
|
|
|
|
|
|
|
# return result
|
2012-07-23 22:22:23 +00:00
|
|
|
render :json => recent_viewed
|
2012-07-19 21:31:57 +00:00
|
|
|
end
|
2012-09-20 12:08:02 +00:00
|
|
|
|
2013-06-12 15:59:58 +00:00
|
|
|
end
|