diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-04 22:19:11 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-04 22:19:11 +0200 |
| commit | cfe98e6eef5ca24b5c2656fcda8e3fac71d55a1d (patch) | |
| tree | fd8724292ce4309b96811160261fbcb4fa30fe06 /app/client/socket | |
| parent | d38fd8419223560bc82f6153de80f889bbd75b01 (diff) | |
going over all this task stuff
Diffstat (limited to 'app/client/socket')
| -rw-r--r-- | app/client/socket/socket.task.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/client/socket/socket.task.js b/app/client/socket/socket.task.js index 595066e..2f3c65a 100644 --- a/app/client/socket/socket.task.js +++ b/app/client/socket/socket.task.js @@ -47,6 +47,22 @@ socket.on('task_res', (data) => { } }) +export function add_task(task, opt={}) { + socket.emit('task', { + type: 'add', + task, + ...opt, + }) +} + +export function remove_task(task, opt={}) { + socket.emit('task', { + type: 'remove', + task, + ...opt, + }) +} + export function start_task(task, opt={}) { socket.emit('task', { type: 'start', |
