fedicrawl/application/src/Storage/Feeds/fetchFeedByNodeAndName.ts

11 wiersze
268 B
TypeScript

import { Node, PrismaClient, Feed } from '@prisma/client'
export const fetchFeedByNodeAndName = async (prisma:PrismaClient, node:Node, name:string):Promise<Feed> => {
return await prisma.feed.findFirst({
where: {
node: node,
name: name
}
})
}