Skip to content

Commit

Permalink
fix: skip loadExistClient if not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
saltbo committed Jul 12, 2021
1 parent a159b5e commit d029fbf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/app/service/user_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/google/uuid"
"github.com/saltbo/zpan/internal/app/dao"
"github.com/saltbo/zpan/internal/app/model"
"github.com/spf13/viper"
)

var cs = store.NewClientStore()
Expand Down Expand Up @@ -77,6 +78,10 @@ func (uk *UserKey) ResetSecret(muk *model.UserKey) error {
}

func (uk *UserKey) LoadExistClient() {
if !viper.IsSet("installed") {
return
}

list, _, err := uk.dUserKey.FindAll(dao.NewQuery())
if err != nil {
log.Println(err)
Expand Down

0 comments on commit d029fbf

Please sign in to comment.