|
|
@ -109,11 +109,16 @@ function deleteSnippet(uid) {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const createSnippet = debounce(data => updateSnippet(null, data), ms('5s'), {
|
|
|
|
|
|
|
|
leading: true,
|
|
|
|
|
|
|
|
trailing: false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
snippet: {
|
|
|
|
snippet: {
|
|
|
|
get: getSnippet,
|
|
|
|
get: getSnippet,
|
|
|
|
update: debounce(updateSnippet, ms('1s'), { leading: true, trailing: true }),
|
|
|
|
update: debounce(updateSnippet, ms('1s'), { leading: true, trailing: true }),
|
|
|
|
create: data => updateSnippet(null, data),
|
|
|
|
create: createSnippet,
|
|
|
|
delete: id => deleteSnippet(id)
|
|
|
|
delete: id => deleteSnippet(id)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tweet: debounce(tweet, ms('5s'), { leading: true, trailing: false }),
|
|
|
|
tweet: debounce(tweet, ms('5s'), { leading: true, trailing: false }),
|
|
|
|