Skip to content

Commit

Permalink
Updated cookies.md with register signature
Browse files Browse the repository at this point in the history
at 9.0.4 we should return a callback, or we've got a ts error:

TS2345: Argument of type 'typeof fastifyCookie' is not assignable to parameter of type 'FastifyPluginCallback  | FastifyPluginAsync  | Promise{ default: FastifyPluginCallback ; }> | Promise...>'.
  • Loading branch information
fedotarte authored Sep 5, 2023
1 parent 4c648e3 commit 5fa11b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/techniques/cookies.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const app = await NestFactory.create<NestFastifyApplication>(
AppModule,
new FastifyAdapter(),
);
await app.register(fastifyCookie, {
await app.register(() => fastifyCookie, {
secret: 'my-secret', // for cookies signature
});
```
Expand Down

0 comments on commit 5fa11b1

Please sign in to comment.