From a0f4383d415c5b9324858c1c33a6fcefa2e05d76 Mon Sep 17 00:00:00 2001 From: Xhofe Date: Wed, 30 Mar 2022 14:06:50 +0800 Subject: [PATCH] feat(quark): set status --- drivers/quark/driver.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/quark/driver.go b/drivers/quark/driver.go index 15eba079..9adcb5ca 100644 --- a/drivers/quark/driver.go +++ b/drivers/quark/driver.go @@ -64,6 +64,12 @@ func (driver Quark) Save(account *model.Account, old *model.Account) error { return nil } _, err := driver.Get("/config", nil, nil, account) + if err == nil { + account.Status = "work" + } else { + account.Status = err.Error() + } + _ = model.SaveAccount(account) return err }