feat: Add event selection to Slack post integration (#2857)

This commit is contained in:
Tom Moor
2021-12-16 22:30:23 -08:00
committed by GitHub
parent 9a7b5ea1f4
commit d4695f3b5b
13 changed files with 270 additions and 69 deletions

View File

@@ -21,11 +21,11 @@ export default class BaseModel {
try {
// ensure that the id is passed if the document has one
if (params) {
params = { ...params, id: this.id };
if (!params) {
params = this.toJS();
}
const model = await this.store.save(params || this.toJS());
const model = await this.store.save({ ...params, id: this.id });
// if saving is successful set the new values on the model itself
set(this, { ...params, ...model });