API helpers: rename createJournalEntry -> addJournalEntry.

Following the change from the previous commit.
master
Tom Hacohen 6 years ago
parent 9b7f24eb8a
commit 941b47b59a

@ -36,7 +36,7 @@ import { fetchEntries } from '../store/actions';
import { SyncInfo } from '../SyncGate'; import { SyncInfo } from '../SyncGate';
import { createJournalEntry } from '../etesync-helpers'; import { addJournalEntry } from '../etesync-helpers';
import { syncEntriesToItemMap, syncEntriesToEventItemMap, syncEntriesToTaskItemMap } from '../journal-processors'; import { syncEntriesToItemMap, syncEntriesToEventItemMap, syncEntriesToTaskItemMap } from '../journal-processors';
@ -261,7 +261,7 @@ class Pim extends React.PureComponent {
} }
const saveEvent = store.dispatch( const saveEvent = store.dispatch(
createJournalEntry( addJournalEntry(
this.props.etesync, this.props.userInfo, journal, this.props.etesync, this.props.userInfo, journal,
prevUid, action, item.toIcal())); prevUid, action, item.toIcal()));
(saveEvent as any).then(() => { (saveEvent as any).then(() => {
@ -296,7 +296,7 @@ class Pim extends React.PureComponent {
} }
const deleteItem = store.dispatch( const deleteItem = store.dispatch(
createJournalEntry( addJournalEntry(
this.props.etesync, this.props.userInfo, journal, this.props.etesync, this.props.userInfo, journal,
prevUid, action, item.toIcal())); prevUid, action, item.toIcal()));
(deleteItem as any).then(() => { (deleteItem as any).then(() => {

@ -3,7 +3,7 @@ import * as EteSync from './api/EteSync';
import { CredentialsData, UserInfoData } from './store'; import { CredentialsData, UserInfoData } from './store';
import { addEntries } from './store/actions'; import { addEntries } from './store/actions';
export function createJournalEntry( export function addJournalEntry(
etesync: CredentialsData, etesync: CredentialsData,
userInfo: UserInfoData, userInfo: UserInfoData,
journal: EteSync.Journal, journal: EteSync.Journal,

Loading…
Cancel
Save