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

@@ -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> {