Skip to content

Commit

Permalink
Use correct type for timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
kqualters-elastic committed Feb 27, 2020
1 parent 8ae65ae commit c809dcd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ export const resolverMiddlewareFactory: MiddlewareFactory = context => {
if (action.type === 'userChangedSelectedEvent') {
if (context?.services.http) {
api.dispatch({ type: 'appRequestedResolverData' });
// const uniquePid = action.payload.selectedEvent?.endgame.unique_pid;
// const legacyEndpointID = action.payload.selectedEvent?.agent.id;
const uniquePid = '3096';
const legacyEndpointID = '5f78bf8f-ddee-4890-ad61-6b5182309639';
const uniquePid = action.payload.selectedEvent?.endgame.unique_pid;
const legacyEndpointID = action.payload.selectedEvent?.agent.id;
const [{ lifecycle }, { children }, { events: relatedEvents }] = await Promise.all([
context.services.http.get(`/api/endpoint/resolver/${uniquePid}`, {
query: { legacyEndpointID },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { EndpointAppConstants } from '../../../../common/types';

describe('related events query', () => {
it('generates the correct legacy queries', () => {
const timestamp = new Date().getTime().toString();
const timestamp = new Date().getTime();
expect(
new RelatedEventsQuery('awesome-id', { size: 1, timestamp, eventID: 'foo' }).build('5')
).toStrictEqual({
Expand Down Expand Up @@ -48,7 +48,7 @@ describe('related events query', () => {
});

it('generates the correct non-legacy queries', () => {
const timestamp = new Date().getTime().toString();
const timestamp = new Date().getTime();

expect(
new RelatedEventsQuery(undefined, { size: 1, timestamp, eventID: 'bar' }).build('baz')
Expand Down

0 comments on commit c809dcd

Please sign in to comment.