Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Aug 14, 2020
1 parent 37cbdbc commit aa25f23
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/reporting/server/lib/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class ReportingStore {
meta: {
// We are copying these values out of payload because these fields are indexed and can be aggregated on
// for tracking stats, while payload contents are not.
objectType: params.type,
objectType: (params as any).type, // params.type for legacy (7.x)
layout: params.layout ? params.layout.id : 'none',
},
payload: report.payload,
Expand Down
6 changes: 5 additions & 1 deletion x-pack/plugins/reporting/server/routes/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ export function registerLegacy(
logger.warn(message, ['deprecation']);

try {
const { savedObjectId }: { savedObjectId: string } = req.params as any;
const {
savedObjectId,
browserTimezone,
}: { savedObjectId: string; browserTimezone: string } = req.params as any;
const queryString = querystring.stringify(req.query as any);

return await handler(
Expand All @@ -51,6 +54,7 @@ export function registerLegacy(
{
objectType,
savedObjectId,
browserTimezone,
queryString,
},
context,
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/reporting/server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ export interface CreateJobBaseParams {
browserTimezone: string;
layout?: LayoutInstance; // for screenshot type reports
objectType: string;
savedObjectId?: string; // legacy (7.x) only
queryString?: string; // legacy (7.x) only
}

export interface CreateJobBaseParamsEncryptedFields extends CreateJobBaseParams {
Expand Down

0 comments on commit aa25f23

Please sign in to comment.