Skip to content

Commit

Permalink
fix: create a new cookies decorator as well (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcdo29 committed Jul 24, 2023
2 parents 0b6daff + 59aa526 commit 6af8f62
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ export const Cookies = createParamDecorator(
return req.cookies;
},
);

export const NewCookies = createParamDecorator(
(_data: never, context: ExecutionContext) =>
context.switchToHttp().getRequest<NestCookieRequest<{}>>()._cookies,
);

0 comments on commit 6af8f62

Please sign in to comment.