src/lib/services/Tasks.js
Function fetchAsana
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fetchAsana ({now, tonight, friday}, api) {
if (api.token || api.refreshToken) {
let client
return (() => {
if (api.refreshToken) {
Function fetchTodoist
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fetchTodoist ({now, tonight, friday}, api) {
if (api.token || api.refreshToken) {
const todoistRequest = (uri, params) => {
params.token = api.token
return request({
Function exec
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exec () {
const now = new Date()
const tonight = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999)
const dayOfWeek = tonight.getDay()
const friday = new Date(tonight.getTime() + ((5 - dayOfWeek) * (1000 * 60 * 60 * 24)))