Revert migration script to ensure data is migrated

This commit is contained in:
Amir Zarrinkafsh 2020-01-06 18:28:06 +11:00 committed by Clément Michaud
parent eeefec2fac
commit c60904add7
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ func migrateLocalU2FSecret(dbProvider storage.Provider) {
} }
func migrateLocalPreferences(dbProvider storage.Provider) { func migrateLocalPreferences(dbProvider storage.Provider) {
file, err := os.Open(path.Join(localDatabasePath, "preferred_2fa_method")) file, err := os.Open(path.Join(localDatabasePath, "prefered_2fa_method"))
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }

View File

@ -124,7 +124,7 @@ func migrateMongoTOTPDevices(db *mongo.Database, dbProvider storage.Provider) {
} }
func migrateMongoPreferences(db *mongo.Database, dbProvider storage.Provider) { func migrateMongoPreferences(db *mongo.Database, dbProvider storage.Provider) {
u2fCollection := db.Collection("preferred_2fa_method") u2fCollection := db.Collection("prefered_2fa_method")
cur, err := u2fCollection.Find(context.Background(), bson.D{}) cur, err := u2fCollection.Find(context.Background(), bson.D{})
if err != nil { if err != nil {