This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/app/stores/NotificationSettingsStore.js

18 lines
483 B
JavaScript

// @flow
import { find } from "lodash";
import NotificationSetting from "models/NotificationSetting";
import BaseStore from "./BaseStore";
import RootStore from "./RootStore";
export default class NotificationSettingsStore extends BaseStore<NotificationSetting> {
actions = ["list", "create", "delete"];
constructor(rootStore: RootStore) {
super(rootStore, NotificationSetting);
}
getByEvent = (event: string) => {
return find(this.orderedData, { event });
};
}