refactor: migrate credential consumers to git_credential
Problem: `credentials.lua`, `submit.lua`, and `scraper.lua` all routed through `cache.get/set/clear_credentials`, which no longer exists. Solution: replace all `cache` credential calls with direct `git_credential.get/store/reject` calls. Remove unused `cache` imports where applicable.
This commit is contained in:
parent
be1bc2095e
commit
d1127f3e9b
3 changed files with 15 additions and 14 deletions
|
|
@ -347,7 +347,7 @@ function M.login(platform, credentials, on_status, callback)
|
|||
stdin = vim.json.encode(credentials),
|
||||
on_event = function(ev)
|
||||
if ev.credentials ~= nil and next(ev.credentials) ~= nil then
|
||||
require('cp.cache').set_credentials(platform, ev.credentials)
|
||||
require('cp.git_credential').store(platform, ev.credentials)
|
||||
end
|
||||
if ev.status ~= nil then
|
||||
if type(on_status) == 'function' then
|
||||
|
|
@ -395,7 +395,7 @@ function M.submit(
|
|||
stdin = vim.json.encode(credentials),
|
||||
on_event = function(ev)
|
||||
if ev.credentials ~= nil and next(ev.credentials) ~= nil then
|
||||
require('cp.cache').set_credentials(platform, ev.credentials)
|
||||
require('cp.git_credential').store(platform, ev.credentials)
|
||||
end
|
||||
if ev.status ~= nil then
|
||||
if type(on_status) == 'function' then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue