mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-07-22 15:18:02 +00:00
Implement OOP hosttree (#32)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
@ -134,9 +134,9 @@ func (a *App) UpdateFoundDocument(hostKey, dbKey, collKey, idJson, newDocJson st
|
||||
}
|
||||
defer close()
|
||||
|
||||
if _, err := client.Database(dbKey).Collection(collKey).UpdateOne(ctx, id, bson.M{"$set": newDoc}); err != nil {
|
||||
runtime.LogInfof(a.ctx, "Error while performing find/update: %s", err.Error())
|
||||
zenity.Error(err.Error(), zenity.Title("Unable to perform update"), zenity.ErrorIcon)
|
||||
if _, err := client.Database(dbKey).Collection(collKey).ReplaceOne(ctx, id, newDoc); err != nil {
|
||||
runtime.LogInfof(a.ctx, "Error while replacing document: %s", err.Error())
|
||||
zenity.Error(err.Error(), zenity.Title("Unable to replace document"), zenity.ErrorIcon)
|
||||
return false
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user