Skip to content

Commit aa25f23

Browse files
committed
fix test
1 parent 37cbdbc commit aa25f23

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

x-pack/plugins/reporting/server/lib/store/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class ReportingStore {
121121
meta: {
122122
// We are copying these values out of payload because these fields are indexed and can be aggregated on
123123
// for tracking stats, while payload contents are not.
124-
objectType: params.type,
124+
objectType: (params as any).type, // params.type for legacy (7.x)
125125
layout: params.layout ? params.layout.id : 'none',
126126
},
127127
payload: report.payload,

x-pack/plugins/reporting/server/routes/legacy.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ export function registerLegacy(
4242
logger.warn(message, ['deprecation']);
4343

4444
try {
45-
const { savedObjectId }: { savedObjectId: string } = req.params as any;
45+
const {
46+
savedObjectId,
47+
browserTimezone,
48+
}: { savedObjectId: string; browserTimezone: string } = req.params as any;
4649
const queryString = querystring.stringify(req.query as any);
4750

4851
return await handler(
@@ -51,6 +54,7 @@ export function registerLegacy(
5154
{
5255
objectType,
5356
savedObjectId,
57+
browserTimezone,
5458
queryString,
5559
},
5660
context,

x-pack/plugins/reporting/server/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ export interface CreateJobBaseParams {
171171
browserTimezone: string;
172172
layout?: LayoutInstance; // for screenshot type reports
173173
objectType: string;
174+
savedObjectId?: string; // legacy (7.x) only
175+
queryString?: string; // legacy (7.x) only
174176
}
175177

176178
export interface CreateJobBaseParamsEncryptedFields extends CreateJobBaseParams {

0 commit comments

Comments
 (0)