Skip to content

Commit

Permalink
fix accidental declaration of interface methods as function properties
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Jul 14, 2021
1 parent 296e137 commit 93dadad
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions x-pack/plugins/reporting/server/routes/lib/jobs_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ export type ReportContent = Pick<ReportSource, 'status' | 'jobtype' | 'output'>
};

interface JobsQueryFactory {
list: (
list(
jobTypes: string[],
user: ReportingUser,
page: number,
size: number,
jobIds: string[] | null
) => Promise<ReportApiJSON[]>;
count: (jobTypes: string[], user: ReportingUser) => Promise<number>;
get: (user: ReportingUser, id: string) => Promise<ReportApiJSON | void>;
getContent: (user: ReportingUser, id: string) => Promise<ReportContent | void>;
delete: (deleteIndex: string, id: string) => Promise<ApiResponse<DeleteResponse>>;
): Promise<ReportApiJSON[]>;
count(jobTypes: string[], user: ReportingUser): Promise<number>;
get(user: ReportingUser, id: string): Promise<ReportApiJSON | void>;
getContent(user: ReportingUser, id: string): Promise<ReportContent | void>;
delete(deleteIndex: string, id: string): Promise<ApiResponse<DeleteResponse>>;
}

export function jobsQueryFactory(reportingCore: ReportingCore): JobsQueryFactory {
Expand Down Expand Up @@ -131,7 +131,7 @@ export function jobsQueryFactory(reportingCore: ReportingCore): JobsQueryFactory
return response?.body.count ?? 0;
},

async get(user, id, opts = {}) {
async get(user, id) {
const { logger } = reportingCore.getPluginSetupDeps();
if (!id) {
logger.warning(`No ID provided for GET`);
Expand Down

0 comments on commit 93dadad

Please sign in to comment.