Skip to content

Commit

Permalink
Freeze subclients
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Apr 5, 2021
1 parent f205cec commit f888793
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/client/alerts/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ export const createAlertsSubClient: CasesSubClientImplementation<AlertSubClient>
}),
};

return alertsSubClient;
return Object.freeze(alertsSubClient);
};
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/client/attachments/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ export const createAttachmentsSubClient: CasesSubClientImplementation<Attachment
}),
};

return attachmentSubClient;
return Object.freeze(attachmentSubClient);
};
4 changes: 3 additions & 1 deletion x-pack/plugins/cases/server/client/cases/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const createCasesSubClient: CasesSubClientImplementation<CasesSubClient>
getClientsFactories
) => {
const {
attachmentService,
caseConfigureService,
caseService,
user,
Expand Down Expand Up @@ -87,6 +88,7 @@ export const createCasesSubClient: CasesSubClientImplementation<CasesSubClient>
push: (params: CasePush) =>
push({
...params,
attachmentService,
savedObjectsClient,
caseService,
userActionService,
Expand All @@ -108,5 +110,5 @@ export const createCasesSubClient: CasesSubClientImplementation<CasesSubClient>
}),
};

return casesSubClient;
return Object.freeze(casesSubClient);
};
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/client/configure/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ export const createConfigurationSubClient: CasesSubClientImplementation<Configur
}),
};

return configureSubClient;
return Object.freeze(configureSubClient);
};
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/client/user_actions/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ export const createUserActionsSubClient: CasesSubClientImplementation<UserAction
}),
};

return attachmentSubClient;
return Object.freeze(attachmentSubClient);
};

0 comments on commit f888793

Please sign in to comment.