client/src/actions/notesActions.js
author Alexandre Segura <mex.zktk@gmail.com>
Thu, 01 Jun 2017 17:32:07 +0200
changeset 16 e67cd18cc594
parent 15 4a8bbd314a46
child 17 877d8796b86d
permissions -rw-r--r--
Draft implementation of note timing.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import uuidV1 from 'uuid/v1';
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
import * as types from '../constants/actionTypes';
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
15
4a8bbd314a46 Store note JSON data.
Alexandre Segura <mex.zktk@gmail.com>
parents: 12
diff changeset
     5
export const addNote = (session, data) => {
3
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
  return {
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
    type: types.ADD_NOTE,
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
    note: {
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
      id: uuidV1(),
12
48ddaa42b810 Draft implementation of sessions.
Alexandre Segura <mex.zktk@gmail.com>
parents: 3
diff changeset
    10
      session: session.id,
15
4a8bbd314a46 Store note JSON data.
Alexandre Segura <mex.zktk@gmail.com>
parents: 12
diff changeset
    11
      raw: data.raw,
16
e67cd18cc594 Draft implementation of note timing.
Alexandre Segura <mex.zktk@gmail.com>
parents: 15
diff changeset
    12
      plain: data.plain,
e67cd18cc594 Draft implementation of note timing.
Alexandre Segura <mex.zktk@gmail.com>
parents: 15
diff changeset
    13
      startedAt: data.startedAt,
e67cd18cc594 Draft implementation of note timing.
Alexandre Segura <mex.zktk@gmail.com>
parents: 15
diff changeset
    14
      finishedAt: data.finishedAt
3
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
    }
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
  };
3b5d37d84cfe Some code rename and reorg + basic tests
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
}