fix: updateById error

This commit is contained in:
2019-06-13 18:58:56 +08:00
parent eef5226ac3
commit 034a43b2e8
7 changed files with 97 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
src
test
typings
bundled
build
coverage
docs
wiki
gulpfile.js
bower.json
karma.conf.js
tsconfig.json
typings.json
CONTRIBUTING.md
ISSUE_TEMPLATE.md
PULL_REQUEST_TEMPLATE.md
tslint.json
wallaby.js
.travis.yml
.gitignore
.vscode
type_definitions

View File

@@ -53,7 +53,7 @@ export class MongoDBClient<T = any> implements DBClient {
}
public async updateById(objectId: string, model: any): Promise<boolean> {
return await this.updateOne({ _id: new ObjectID(objectId) }, { $set: model })
return await this.updateOne({ _id: new ObjectID(objectId) }, model)
}
public async deleteOne(where: any): Promise<boolean> {