kopia lustrzana https://github.com/Stopka/fedicrawl
12 wiersze
380 B
TypeScript
12 wiersze
380 B
TypeScript
import { PrismaClient, Feed } from '@prisma/client'
|
|
|
|
export const deleteAllFeedFields = async (prisma:PrismaClient, feed:Feed):Promise<number> => {
|
|
const result = await prisma.field.deleteMany({
|
|
where: {
|
|
feedId: feed.id
|
|
}
|
|
})
|
|
console.log('Removed all fields from feed', { count: result.count, feedName: feed.name, nodeId: feed.nodeId })
|
|
return result.count
|
|
}
|