fix return
This commit is contained in:
parent
4c4a0ba9b9
commit
60defec633
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue