fix debounce for tweet and image api calls

main
Mike Fix 6 years ago
parent 407ee94f54
commit 3115b3cc28

@ -18,7 +18,7 @@ const gistClient = axios.create({
}
})
async function tweet(content, encodedImage) {
function tweet(content, encodedImage) {
const processedData = encodedImage.split(',')[1]
return client
@ -70,6 +70,6 @@ function checkIfRateLimited(err) {
export default {
client,
getGist,
tweet: debounce(tweet, ms('5s'), { leading: true, trailing: true }),
image: debounce(image, ms('5s'), { leading: true, trailing: true })
tweet: debounce(tweet, ms('5s'), { leading: true, trailing: false }),
image: debounce(image, ms('5s'), { leading: true, trailing: false })
}

Loading…
Cancel
Save