Fix server public key assignment and rename Wipe() to WipeFolder()
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc 2024-03-31 15:52:50 +02:00
parent 54b932e9c1
commit 903702c719
2 changed files with 4 additions and 1 deletions

View File

@ -82,6 +82,9 @@ func InvitationGetMessage(invitationUrl string, serverPublicKey string, invitati
return nil, "InvitationGetMessage: StoreServer", err return nil, "InvitationGetMessage: StoreServer", err
} }
} else { } else {
if dbsrv.PublicKey != serverPublicKey {
dbsrv.PublicKey = serverPublicKey
}
srv = *dbsrv srv = *dbsrv
} }
// buildserver message // buildserver message

View File

@ -58,7 +58,7 @@ func (id *Identity) CreateFolder() error {
return nil return nil
} }
func (id *Identity) Wipe() error { func (id *Identity) WipeFolder() error {
err := os.RemoveAll(filepath.Join(GetConfig().StoragePath, id.Uuid)) err := os.RemoveAll(filepath.Join(GetConfig().StoragePath, id.Uuid))
if err != nil { if err != nil {
return err return err