ci: format
This commit is contained in:
parent
d95d9c84fd
commit
4ad31ec804
2 changed files with 9 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue