8 lines
278 B
TypeScript
8 lines
278 B
TypeScript
import { Types } from 'mongoose';
|
|
|
|
import { STRATEGIES } from '../../constants/strategies';
|
|
import { Strategy } from '../../model/strategy';
|
|
|
|
export const readOneByParentAndMethod = async (parent: Types.ObjectId, method: STRATEGIES) =>
|
|
Strategy.findOne({ method, parent });
|