import DBResearch from '../../types/db/DBResearch';
import { Research } from '../db/mongodb';

export const getAllResearch = async () => {
    return (await Research()).find({}).toArray() as unknown as Array<DBResearch>;   
}

export const getResearchById = async (id: string) => {
    return (await Research()).findOne({
        id
    }) as unknown as DBResearch;
}