From 48514ba5ca64ea7690b6b02e512d0c0144590c1e Mon Sep 17 00:00:00 2001 From: Adrian Czerwiec Date: Mon, 4 Nov 2024 13:53:28 +0100 Subject: [PATCH] minor issues --- examples/room-manager/src/plugins/fishjam.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/room-manager/src/plugins/fishjam.ts b/examples/room-manager/src/plugins/fishjam.ts index 193d979..8aae7ec 100644 --- a/examples/room-manager/src/plugins/fishjam.ts +++ b/examples/room-manager/src/plugins/fishjam.ts @@ -1,4 +1,4 @@ -import fp from 'fastify-plugin'; +import fastifyPlugin from 'fastify-plugin'; import { type FastifyInstance } from 'fastify'; import { FishjamClient, Room, RoomNotFoundException } from '@fishjam-cloud/js-server-sdk'; import { ServerMessage } from '@fishjam-cloud/js-server-sdk/proto'; @@ -14,7 +14,7 @@ declare module 'fastify' { } } -export const fishjamPlugin = fp(async (fastify: FastifyInstance): Promise => { +export const fishjamPlugin = fastifyPlugin(async (fastify: FastifyInstance): Promise => { if (fastify.hasDecorator('fishjam')) { throw new Error('The `fishjamPlugin` plugin has already been registered.'); } @@ -42,7 +42,7 @@ export const fishjamPlugin = fp(async (fastify: FastifyInstance): Promise if (!peer) { fastify.log.info({ name: 'Creating peer' }); - return await createPeer(roomName, username); + return createPeer(roomName, username); } if (!peerAccess?.peerToken) throw new RoomManagerError('Missing peer token in room');