[MM-54456] Fix potential read after write issue when loading license (#24524)

* Fix potential read after write issue when loading license

* Use upsert
Этот коммит содержится в:
Claudio Costa
2023-09-13 14:47:12 -06:00
коммит произвёл GitHub
родитель c53b5f7b2b
Коммит b4a47803e6
8 изменённых файлов: 71 добавлений и 81 удалений

Просмотреть файл

@@ -638,8 +638,8 @@ type PreferenceStore interface {
}
type LicenseStore interface {
Save(license *model.LicenseRecord) (*model.LicenseRecord, error)
Get(id string) (*model.LicenseRecord, error)
Save(license *model.LicenseRecord) error
Get(ctx context.Context, id string) (*model.LicenseRecord, error)
GetAll() ([]*model.LicenseRecord, error)
}