diff options
Diffstat (limited to 'app/client/queue/queue.actions.js')
| -rw-r--r-- | app/client/queue/queue.actions.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/client/queue/queue.actions.js b/app/client/queue/queue.actions.js index 6e39e71..3450ecc 100644 --- a/app/client/queue/queue.actions.js +++ b/app/client/queue/queue.actions.js @@ -1,6 +1,8 @@ import socket from '../socket' import types from '../types' +import actions from '../actions' + export const start_task = (task, opt={}) => { socket.task.start_task(task, opt) return { type: types.task.starting_task, task, ...opt } @@ -10,3 +12,10 @@ export const stop_task = (task, opt={}) => { socket.task.stop_task(task, opt) return { type: types.task.stopping_task, task, ...opt } } + +export const add_task = (new_task) => (dispatch) => { + actions.task.create(new_task) + .then((task) => { + socket.task.add_task(task, opt) + }) +}
\ No newline at end of file |
