Skip to content

Commit

Permalink
chore(deps): update all deps and upgrade codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalLytek committed Feb 3, 2023
1 parent ed127d0 commit acee2af
Show file tree
Hide file tree
Showing 6 changed files with 14,235 additions and 12,323 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- support overwriting fields of extended types (#1109)
- properly execute args validation for nullable items array (#1328)
### Others
- **Breaking Change**: update `class-validator` peer dependency to `>=0.13.0`
- **Breaking Change**: update `class-validator` peer dependency to `>=0.14.0`
- **Breaking Change**: change build config to ES2019 - drop support for Node.js < 14.5

## v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions examples/typegoose/typegoose-middleware.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Model, Document } from "mongoose";
import { getClassForDocument } from "@typegoose/typegoose";
import { getClass } from "@typegoose/typegoose";
import { MiddlewareFn } from "../../src";

export const TypegooseMiddleware: MiddlewareFn = async (_, next) => {
Expand All @@ -18,7 +18,7 @@ export const TypegooseMiddleware: MiddlewareFn = async (_, next) => {

function convertDocument(doc: Document) {
const convertedDocument = doc.toObject();
const DocumentClass = getClassForDocument(doc)!;
const DocumentClass = getClass(doc)!;
Object.setPrototypeOf(convertedDocument, DocumentClass.prototype);
return convertedDocument;
}
Loading

0 comments on commit acee2af

Please sign in to comment.