update set
This commit is contained in:
@@ -65,7 +65,7 @@ func (dma *AbstractAccessor) GenericDeleteOne(id string, accessor Accessor) (DBO
|
||||
return res, 200, nil
|
||||
}
|
||||
|
||||
func (dma *AbstractAccessor) GenericUpdateOne(set map[string]interface{}, id string, accessor Accessor) (DBObject, int, error) {
|
||||
func (dma *AbstractAccessor) GenericUpdateOne(set interface{}, id string, accessor Accessor) (DBObject, int, error) {
|
||||
id, code, err := mongo.MONGOService.UpdateOne(set, id, accessor.GetType())
|
||||
if err != nil {
|
||||
dma.Logger.Error().Msg("Could not update " + id + " to db. Error: " + err.Error())
|
||||
|
@@ -16,5 +16,5 @@ type Accessor interface {
|
||||
DeleteOne(id string) (DBObject, int, error)
|
||||
CopyOne(data DBObject) (DBObject, int, error)
|
||||
StoreOne(data DBObject) (DBObject, int, error)
|
||||
UpdateOne(set map[string]interface{}, id string) (DBObject, int, error)
|
||||
UpdateOne(set DBObject, id string) (DBObject, int, error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user