fix: updateById error
This commit is contained in:
22
packages/cc-server-db-mongo/.npmignore
Normal file
22
packages/cc-server-db-mongo/.npmignore
Normal 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
|
||||
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user