Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelavoyan committed Jun 30, 2024
1 parent 14a024f commit 5134925
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FastifyReply, FastifyRequest } from "fastify";
export async function getPresentationRequest(
req: FastifyRequest,
reply: FastifyReply,
){
) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const deepLink = req.body
Expand Down
12 changes: 6 additions & 6 deletions packages/sample-server/src/plugins/vclSdkPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ const vclSdkPlugin: FastifyPluginAsync | FastifyPluginCallback = async (
console.error('Failed to initialize VCL SDK', e);
throw e;
}
fastify
.decorate('vclSdk', vclSdk)
.decorateRequest('vclSdk', null)
.addHook('preValidation', async (req) => {
req.vclSdk = fastify.vclSdk;
});
fastify.decorate('vclSdk', vclSdk)
fastify.addHook('preHandler', function (req, reply, done) {
req.vclSdk = vclSdk
reply.vclSdk = vclSdk
done()
})
};

export default vclSdkPlugin;

0 comments on commit 5134925

Please sign in to comment.