populatePublishedAt() — supabase Function Reference
Architecture documentation for the populatePublishedAt() function in populatePublishedAt.ts from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/cms/src/hooks/populatePublishedAt.ts lines 3–15
export const populatePublishedAt: CollectionBeforeChangeHook = ({ data, operation, req }) => {
if (operation === 'create' || operation === 'update') {
if (req.data && !req.data.publishedAt) {
const now = new Date()
return {
...data,
publishedAt: now,
}
}
}
return data
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free