chat: add update-metadata to metadata reducer

This commit is contained in:
Matilde Park 2020-03-02 22:03:27 -05:00
parent 4637587afd
commit 88b34c2ba7

View File

@ -6,6 +6,7 @@ export class MetadataReducer {
if (data) {
this.associations(data, state);
this.add(data, state);
this.update(data, state);
}
}
@ -29,4 +30,13 @@ export class MetadataReducer {
state.associations = metadata;
}
}
update(json, state) {
let data = _.get(json, 'update-metadata', false);
if (data) {
let metadata = state.associations;
metadata.set(data["app-path"], data);
state.associations = metadata;
}
}
}