summaryrefslogtreecommitdiff
path: root/app/client/socket
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-04 22:19:11 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-04 22:19:11 +0200
commitcfe98e6eef5ca24b5c2656fcda8e3fac71d55a1d (patch)
treefd8724292ce4309b96811160261fbcb4fa30fe06 /app/client/socket
parentd38fd8419223560bc82f6153de80f889bbd75b01 (diff)
going over all this task stuff
Diffstat (limited to 'app/client/socket')
-rw-r--r--app/client/socket/socket.task.js16
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',