feat(GODT-2709): Init Configuration status.

This commit is contained in:
Romain LE JEUNE
2023-06-27 08:42:47 +02:00
committed by Romain Le Jeune
parent 4e080b59d3
commit ff11d20d9c
10 changed files with 233 additions and 1 deletions

View File

@ -28,6 +28,7 @@ type Locator interface {
ProvideLogsPath() (string, error)
ProvideGluonCachePath() (string, error)
ProvideGluonDataPath() (string, error)
ProvideStatsPath() (string, error)
GetLicenseFilePath() string
GetDependencyLicensesLink() string
Clear(...string) error

View File

@ -519,6 +519,11 @@ func (bridge *Bridge) addUserWithVault(
apiUser proton.User,
vault *vault.User,
) error {
statsPath, err := bridge.locator.ProvideStatsPath()
if err != nil {
return fmt.Errorf("failed to get Statistics directory: %w", err)
}
user, err := user.New(
ctx,
vault,
@ -528,6 +533,7 @@ func (bridge *Bridge) addUserWithVault(
bridge.panicHandler,
bridge.vault.GetShowAllMail(),
bridge.vault.GetMaxSyncMemory(),
statsPath,
)
if err != nil {
return fmt.Errorf("failed to create user: %w", err)