cgserver 13.0.0 → 13.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -152,7 +152,8 @@ class MongoBaseService {
|
|
|
152
152
|
if (!this.model) {
|
|
153
153
|
throw new Error("Model is not defined");
|
|
154
154
|
}
|
|
155
|
-
|
|
155
|
+
let rs = await this.model.findOneAndUpdate(filter, update, options);
|
|
156
|
+
return rs;
|
|
156
157
|
}
|
|
157
158
|
async countDocuments(filter) {
|
|
158
159
|
if (!this.model) {
|
|
@@ -35,7 +35,7 @@ export declare class MongoBaseService<T extends Document> {
|
|
|
35
35
|
}>;
|
|
36
36
|
exists(filter: FilterQuery<T>): Promise<boolean>;
|
|
37
37
|
aggregate(pipeline?: any[]): mongoose.Aggregate<any[]>;
|
|
38
|
-
findOneAndUpdate(filter: FilterQuery<T>, update: UpdateQuery<T>, options?:
|
|
38
|
+
findOneAndUpdate(filter: FilterQuery<T>, update: UpdateQuery<T>, options?: MongooseQueryOptions): Promise<mongoose.IfAny<T, any, mongoose.Document<unknown, {}, T, {}> & mongoose.Default__v<mongoose.Require_id<T>>>>;
|
|
39
39
|
countDocuments(filter?: FilterQuery<T>): Promise<number>;
|
|
40
40
|
getAutoIds(): Promise<number>;
|
|
41
41
|
}
|