fleet/frontend/services/entities/activities.ts
Martavis Parker 5be54a72cf
Teams and Software for Homepage (#2567)
* 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
2021-10-19 11:13:18 -07:00

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);
},
};