Skip to content

Commit

Permalink
minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
czerwiukk committed Nov 4, 2024
1 parent 1afa542 commit 48514ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/room-manager/src/plugins/fishjam.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -14,7 +14,7 @@ declare module 'fastify' {
}
}

export const fishjamPlugin = fp(async (fastify: FastifyInstance): Promise<void> => {
export const fishjamPlugin = fastifyPlugin(async (fastify: FastifyInstance): Promise<void> => {
if (fastify.hasDecorator('fishjam')) {
throw new Error('The `fishjamPlugin` plugin has already been registered.');
}
Expand Down Expand Up @@ -42,7 +42,7 @@ export const fishjamPlugin = fp(async (fastify: FastifyInstance): Promise<void>

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');
Expand Down

0 comments on commit 48514ba

Please sign in to comment.