mongo.go重构
This commit is contained in:
@@ -21,6 +21,6 @@ func (d *file) SetNoCache() {
|
||||
|
||||
// Insert 插入
|
||||
func (d *file) Insert(ctx context.Context, entity *entity.File) (err error) {
|
||||
_, err = mongo.Insert(ctx, []interface{}{entity}, consts.FileCollection)
|
||||
_, err = mongo.DB().Insert(ctx, []interface{}{entity}, consts.FileCollection)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user