lazy pagination
parent
83a377c3a3
commit
31224ecbd5
|
@ -66,7 +66,11 @@ Resource = (urlsService, http, paginateResponseService) ->
|
||||||
url = urlsService.resolve("timeline-project")
|
url = urlsService.resolve("timeline-project")
|
||||||
url = "#{url}/#{projectId}"
|
url = "#{url}/#{projectId}"
|
||||||
|
|
||||||
return http.get(url, params).then (result) ->
|
return http.get(url, params, {
|
||||||
|
headers: {
|
||||||
|
'x-lazy-pagination': true
|
||||||
|
}
|
||||||
|
}).then (result) ->
|
||||||
result = Immutable.fromJS(result)
|
result = Immutable.fromJS(result)
|
||||||
return paginateResponseService(result)
|
return paginateResponseService(result)
|
||||||
|
|
||||||
|
|
|
@ -71,8 +71,11 @@ Resource = (urlsService, http, paginateResponseService) ->
|
||||||
params.type = type if type?
|
params.type = type if type?
|
||||||
params.q = q if q?
|
params.q = q if q?
|
||||||
|
|
||||||
return http.get(url, params)
|
return http.get(url, params, {
|
||||||
.then (result) ->
|
headers: {
|
||||||
|
'x-lazy-pagination': true
|
||||||
|
}
|
||||||
|
}).then (result) ->
|
||||||
result = Immutable.fromJS(result)
|
result = Immutable.fromJS(result)
|
||||||
return paginateResponseService(result)
|
return paginateResponseService(result)
|
||||||
|
|
||||||
|
@ -84,8 +87,11 @@ Resource = (urlsService, http, paginateResponseService) ->
|
||||||
params.type = type if type?
|
params.type = type if type?
|
||||||
params.q = q if q?
|
params.q = q if q?
|
||||||
|
|
||||||
return http.get(url, params)
|
return http.get(url, params, {
|
||||||
.then (result) ->
|
headers: {
|
||||||
|
'x-lazy-pagination': true
|
||||||
|
}
|
||||||
|
}).then (result) ->
|
||||||
result = Immutable.fromJS(result)
|
result = Immutable.fromJS(result)
|
||||||
return paginateResponseService(result)
|
return paginateResponseService(result)
|
||||||
|
|
||||||
|
@ -97,8 +103,11 @@ Resource = (urlsService, http, paginateResponseService) ->
|
||||||
params.type = type if type?
|
params.type = type if type?
|
||||||
params.q = q if q?
|
params.q = q if q?
|
||||||
|
|
||||||
return http.get(url, params)
|
return http.get(url, params, {
|
||||||
.then (result) ->
|
headers: {
|
||||||
|
'x-lazy-pagination': true
|
||||||
|
}
|
||||||
|
}).then (result) ->
|
||||||
result = Immutable.fromJS(result)
|
result = Immutable.fromJS(result)
|
||||||
return paginateResponseService(result)
|
return paginateResponseService(result)
|
||||||
|
|
||||||
|
@ -110,7 +119,11 @@ Resource = (urlsService, http, paginateResponseService) ->
|
||||||
url = urlsService.resolve("timeline-profile")
|
url = urlsService.resolve("timeline-profile")
|
||||||
url = "#{url}/#{userId}"
|
url = "#{url}/#{userId}"
|
||||||
|
|
||||||
return http.get(url, params).then (result) ->
|
return http.get(url, params, {
|
||||||
|
headers: {
|
||||||
|
'x-lazy-pagination': true
|
||||||
|
}
|
||||||
|
}).then (result) ->
|
||||||
result = Immutable.fromJS(result)
|
result = Immutable.fromJS(result)
|
||||||
return paginateResponseService(result)
|
return paginateResponseService(result)
|
||||||
|
|
||||||
|
@ -122,7 +135,12 @@ Resource = (urlsService, http, paginateResponseService) ->
|
||||||
url = urlsService.resolve("timeline-user")
|
url = urlsService.resolve("timeline-user")
|
||||||
url = "#{url}/#{userId}"
|
url = "#{url}/#{userId}"
|
||||||
|
|
||||||
return http.get(url, params).then (result) ->
|
|
||||||
|
return http.get(url, params, {
|
||||||
|
headers: {
|
||||||
|
'x-lazy-pagination': true
|
||||||
|
}
|
||||||
|
}).then (result) ->
|
||||||
result = Immutable.fromJS(result)
|
result = Immutable.fromJS(result)
|
||||||
return paginateResponseService(result)
|
return paginateResponseService(result)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue