kopia lustrzana https://github.com/Stopka/fedicrawl
15 wiersze
370 B
TypeScript
15 wiersze
370 B
TypeScript
|
import { Node, PrismaClient } from '@prisma/client'
|
||
|
|
||
|
export const setNodeRefreshed = async (prisma:PrismaClient, node:Node):Promise<Node> => {
|
||
|
const date = new Date()
|
||
|
console.info('Setting node refreshed', { domain: node.domain, date: date })
|
||
|
return await prisma.node.update({
|
||
|
data: {
|
||
|
refreshedAt: date
|
||
|
},
|
||
|
where: {
|
||
|
id: node.id
|
||
|
}
|
||
|
})
|
||
|
}
|