mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
5be54a72cf
* added global teams dropdown * added teams dropdown * created tabs wrapper component * comment out software table for now * lint fixes * added changes file * removed test data * fixed permissions * fixed scroll behavior for test with sticky header * lint fixes
19 lines
540 B
TypeScript
19 lines
540 B
TypeScript
import sendRequest from "services";
|
|
import endpoints from "fleet/endpoints";
|
|
|
|
const DEFAULT_PAGE = 0;
|
|
const PER_PAGE = 8;
|
|
const ORDER_KEY = "created_at";
|
|
const ORDER_DIRECTION = "desc";
|
|
|
|
export default {
|
|
loadNext: (page = DEFAULT_PAGE, perPage = PER_PAGE) => {
|
|
const { ACTIVITIES } = endpoints;
|
|
const pagination = `page=${page}&per_page=${perPage}`;
|
|
const sort = `order_key=${ORDER_KEY}&order_direction=${ORDER_DIRECTION}`;
|
|
const path = `${ACTIVITIES}?${pagination}&${sort}`;
|
|
|
|
return sendRequest("GET", path);
|
|
},
|
|
};
|