change update password related functions
This commit is contained in:
parent
8d474677da
commit
869f06e00f
4 changed files with 40 additions and 23 deletions
|
|
@ -331,11 +331,18 @@ class PasswordStore {
|
|||
let encryptedData = try passwordEntity.encrypt(password: password)
|
||||
let saveURL = storeURL.appendingPathComponent(passwordEntity.rawPath!)
|
||||
try encryptedData.write(to: saveURL)
|
||||
passwordEntity.synced = false
|
||||
progressBlock(0.3)
|
||||
let _ = createAddCommitInRepository(message: "Update password by pass for iOS", fileData: encryptedData, filename: saveURL.lastPathComponent, progressBlock: progressBlock)
|
||||
} catch {
|
||||
print(error)
|
||||
}
|
||||
}
|
||||
|
||||
func saveUpdated(passwordEntity: PasswordEntity) {
|
||||
do {
|
||||
try context.save()
|
||||
} catch {
|
||||
fatalError("Failed to fetch employees: \(error)")
|
||||
fatalError("Failed to save a PasswordEntity: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue