fix return

This commit is contained in:
GleidsonDaniel 2023-03-08 17:00:27 -03:00
parent 4c4a0ba9b9
commit 60defec633
1 changed files with 2 additions and 1 deletions

View File

@ -1,10 +1,11 @@
import database from '..';
import { TSubscriptionModel } from '../../../definitions';
import { TAppDatabase } from '../interfaces';
import { SUBSCRIPTIONS_TABLE } from '../model/Subscription';
const getCollection = (db: TAppDatabase) => db.get(SUBSCRIPTIONS_TABLE);
export const getSubscriptionByRoomId = async (rid: string) => {
export const getSubscriptionByRoomId = async (rid: string): Promise<TSubscriptionModel | null> => {
const db = database.active;
const subCollection = getCollection(db);
try {