forked from v4l3n71n/covas-bo
get page to query param
This commit is contained in:
parent
19e7975b1f
commit
36b3416e37
@ -42,7 +42,16 @@ instance.get("users/count", { withCredentials: true }).then(function(response){
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
instance.get("users", {withCredentials: true, params :{ page:0, nbPages: nbPages}}).then(function(response){
|
|
||||||
|
|
||||||
|
var page = 0;
|
||||||
|
var pageCurrent = getQuery("page");
|
||||||
|
if (pageCurrent.length > 0){
|
||||||
|
page = Number.parseInt(pageCurrent);
|
||||||
|
page = page - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
instance.get("users", {withCredentials: true, params :{ page:page, nbPages: nbPages}}).then(function(response){
|
||||||
var trTag = document.querySelector("#users tbody tr").cloneNode(true);
|
var trTag = document.querySelector("#users tbody tr").cloneNode(true);
|
||||||
listData = response.data;
|
listData = response.data;
|
||||||
for (var i=0; i<listData.length; i++){
|
for (var i=0; i<listData.length; i++){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user