Files
auth-db/src/dao/strategy/readOneByParentAndMethod.ts
mifi e657d09ae5
All checks were successful
continuous-integration/drone/pr Build is passing
Add DAO shit for Strategy model, added types for different ops, bump package version
2023-05-26 17:35:58 -04:00

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 });