diff --git a/lua/pending/sync/gcal.lua b/lua/pending/sync/gcal.lua index 8519099..9158ca1 100644 --- a/lua/pending/sync/gcal.lua +++ b/lua/pending/sync/gcal.lua @@ -1,5 +1,5 @@ -local oauth = require('pending.sync.oauth') local config = require('pending.config') +local oauth = require('pending.sync.oauth') local M = {} @@ -22,8 +22,11 @@ local function find_or_create_calendar(access_token) local gc = (cfg.sync and cfg.sync.gcal) or {} local cal_name = gc.calendar or 'Pendings' - local data, err = - oauth.curl_request('GET', BASE_URL .. '/users/me/calendarList', oauth.auth_headers(access_token)) + local data, err = oauth.curl_request( + 'GET', + BASE_URL .. '/users/me/calendarList', + oauth.auth_headers(access_token) + ) if err then return nil, err end diff --git a/lua/pending/sync/gtasks.lua b/lua/pending/sync/gtasks.lua index de48d2d..f31de99 100644 --- a/lua/pending/sync/gtasks.lua +++ b/lua/pending/sync/gtasks.lua @@ -1,5 +1,5 @@ -local oauth = require('pending.sync.oauth') local config = require('pending.config') +local oauth = require('pending.sync.oauth') local M = {} @@ -99,11 +99,7 @@ end local function update_gtask(access_token, list_id, task_id, body) local _, err = oauth.curl_request( 'PATCH', - BASE_URL - .. '/lists/' - .. oauth.url_encode(list_id) - .. '/tasks/' - .. oauth.url_encode(task_id), + BASE_URL .. '/lists/' .. oauth.url_encode(list_id) .. '/tasks/' .. oauth.url_encode(task_id), oauth.auth_headers(access_token), vim.json.encode(body) ) @@ -117,11 +113,7 @@ end local function delete_gtask(access_token, list_id, task_id) local _, err = oauth.curl_request( 'DELETE', - BASE_URL - .. '/lists/' - .. oauth.url_encode(list_id) - .. '/tasks/' - .. oauth.url_encode(task_id), + BASE_URL .. '/lists/' .. oauth.url_encode(list_id) .. '/tasks/' .. oauth.url_encode(task_id), oauth.auth_headers(access_token) ) return err