add expiry parameter
This commit is contained in:
@@ -194,7 +194,8 @@
|
|||||||
"search[name]": req.term + "*",
|
"search[name]": req.term + "*",
|
||||||
"search[is_active]": true,
|
"search[is_active]": true,
|
||||||
"search[order]": "post_count",
|
"search[order]": "post_count",
|
||||||
"limit": 10
|
"limit": 10,
|
||||||
|
"expiry": 7
|
||||||
},
|
},
|
||||||
method: "get",
|
method: "get",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
@@ -235,7 +236,8 @@
|
|||||||
"search[title]": req.term + "*",
|
"search[title]": req.term + "*",
|
||||||
"search[hide_deleted]": "Yes",
|
"search[hide_deleted]": "Yes",
|
||||||
"search[order]": "post_count",
|
"search[order]": "post_count",
|
||||||
"limit": 10
|
"limit": 10,
|
||||||
|
"expiry": 7
|
||||||
},
|
},
|
||||||
method: "get",
|
method: "get",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
@@ -259,7 +261,8 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/tags/autocomplete.json",
|
url: "/tags/autocomplete.json",
|
||||||
data: {
|
data: {
|
||||||
"search[name_matches]": term
|
"search[name_matches]": term,
|
||||||
|
"expiry": 7
|
||||||
},
|
},
|
||||||
method: "get",
|
method: "get",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class ArtistsController < ApplicationController
|
|||||||
end
|
end
|
||||||
format.json do
|
format.json do
|
||||||
render :json => @artists.to_json(:include => [:urls])
|
render :json => @artists.to_json(:include => [:urls])
|
||||||
expires_in 7.days
|
expires_in params[:expiry].to_i.days if params[:expiry]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -109,7 +109,7 @@ class ArtistsController < ApplicationController
|
|||||||
end
|
end
|
||||||
format.json do
|
format.json do
|
||||||
render :json => @artists.to_json(:include => [:sorted_urls])
|
render :json => @artists.to_json(:include => [:sorted_urls])
|
||||||
expires_in 7.days
|
expires_in params[:expiry].to_i.days if params[:expiry]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class PoolsController < ApplicationController
|
|||||||
end
|
end
|
||||||
format.json do
|
format.json do
|
||||||
render json: @pool.to_json
|
render json: @pool.to_json
|
||||||
expires_in 7.days
|
expires_in params[:expiry].to_i.days if params[:expiry]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ class UsersController < ApplicationController
|
|||||||
render :xml => @users.to_xml(:root => "users")
|
render :xml => @users.to_xml(:root => "users")
|
||||||
end
|
end
|
||||||
format.json do
|
format.json do
|
||||||
render json: @user.to_json
|
render json: @users.to_json
|
||||||
expires_in 7.days
|
expires_in params[:expiry].to_i.days if params[:expiry]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class WikiPagesController < ApplicationController
|
|||||||
end
|
end
|
||||||
format.json do
|
format.json do
|
||||||
render json: @wiki_pages.to_json
|
render json: @wiki_pages.to_json
|
||||||
expires_in 7.days
|
expires_in params[:expiry].to_i.days if params[:expiry]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user